本文整理匯總了Java中org.jfree.data.time.Minute.getLastMillisecond方法的典型用法代碼示例。如果您正苦於以下問題:Java Minute.getLastMillisecond方法的具體用法?Java Minute.getLastMillisecond怎麽用?Java Minute.getLastMillisecond使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.jfree.data.time.Minute
的用法示例。
在下文中一共展示了Minute.getLastMillisecond方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: testGetLastMillisecondWithTimeZone
import org.jfree.data.time.Minute; //導入方法依賴的package包/類
/**
* Some checks for the getLastMillisecond(TimeZone) method.
*/
public void testGetLastMillisecondWithTimeZone() {
Minute m = new Minute(1, 2, 7, 7, 1950);
TimeZone zone = TimeZone.getTimeZone("America/Los_Angeles");
assertEquals(-614962680001L, m.getLastMillisecond(zone));
// try null calendar
boolean pass = false;
try {
m.getLastMillisecond((TimeZone) null);
}
catch (NullPointerException e) {
pass = true;
}
assertTrue(pass);
}
示例2: testGetLastMillisecondWithCalendar
import org.jfree.data.time.Minute; //導入方法依賴的package包/類
/**
* Some checks for the getLastMillisecond(TimeZone) method.
*/
public void testGetLastMillisecondWithCalendar() {
Minute m = new Minute(45, 21, 21, 4, 2001);
GregorianCalendar calendar = new GregorianCalendar(Locale.GERMANY);
assertEquals(987885959999L, m.getLastMillisecond(calendar));
// try null calendar
boolean pass = false;
try {
m.getLastMillisecond((Calendar) null);
}
catch (NullPointerException e) {
pass = true;
}
assertTrue(pass);
}
示例3: testGetLastMillisecondWithTimeZone
import org.jfree.data.time.Minute; //導入方法依賴的package包/類
/**
* Some checks for the getLastMillisecond(TimeZone) method.
*/
public void testGetLastMillisecondWithTimeZone() {
Minute m = new Minute(1, 2, 7, 7, 1950);
TimeZone zone = TimeZone.getTimeZone("America/Los_Angeles");
Calendar c = new GregorianCalendar(zone);
assertEquals(-614962680001L, m.getLastMillisecond(c));
// try null calendar
boolean pass = false;
try {
m.getLastMillisecond((Calendar) null);
}
catch (NullPointerException e) {
pass = true;
}
assertTrue(pass);
}
示例4: testGetLastMillisecondWithCalendar
import org.jfree.data.time.Minute; //導入方法依賴的package包/類
/**
* Some checks for the getLastMillisecond(TimeZone) method.
*/
public void testGetLastMillisecondWithCalendar() {
Minute m = new Minute(45, 21, 21, 4, 2001);
GregorianCalendar calendar = new GregorianCalendar(Locale.GERMANY);
calendar.setTimeZone(TimeZone.getTimeZone("Europe/Frankfurt"));
assertEquals(987889559999L, m.getLastMillisecond(calendar));
// try null calendar
boolean pass = false;
try {
m.getLastMillisecond((Calendar) null);
}
catch (NullPointerException e) {
pass = true;
}
assertTrue(pass);
}