本文整理汇总了Java中org.jfree.data.time.Quarter.getLastMillisecond方法的典型用法代码示例。如果您正苦于以下问题:Java Quarter.getLastMillisecond方法的具体用法?Java Quarter.getLastMillisecond怎么用?Java Quarter.getLastMillisecond使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.jfree.data.time.Quarter
的用法示例。
在下文中一共展示了Quarter.getLastMillisecond方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: testGetLastMillisecondWithTimeZone
import org.jfree.data.time.Quarter; //导入方法依赖的package包/类
/**
* Some checks for the getLastMillisecond(TimeZone) method.
*/
public void testGetLastMillisecondWithTimeZone() {
Quarter q = new Quarter(2, 1950);
TimeZone zone = TimeZone.getTimeZone("America/Los_Angeles");
assertEquals(-615488400001L, q.getLastMillisecond(zone));
// try null calendar
boolean pass = false;
try {
q.getLastMillisecond((TimeZone) null);
}
catch (NullPointerException e) {
pass = true;
}
assertTrue(pass);
}
示例2: testGetLastMillisecondWithCalendar
import org.jfree.data.time.Quarter; //导入方法依赖的package包/类
/**
* Some checks for the getLastMillisecond(TimeZone) method.
*/
public void testGetLastMillisecondWithCalendar() {
Quarter q = new Quarter(3, 2001);
GregorianCalendar calendar = new GregorianCalendar(Locale.GERMANY);
assertEquals(1001890799999L, q.getLastMillisecond(calendar));
// try null calendar
boolean pass = false;
try {
q.getLastMillisecond((Calendar) null);
}
catch (NullPointerException e) {
pass = true;
}
assertTrue(pass);
}
示例3: testGetLastMillisecondWithTimeZone
import org.jfree.data.time.Quarter; //导入方法依赖的package包/类
/**
* Some checks for the getLastMillisecond(TimeZone) method.
*/
public void testGetLastMillisecondWithTimeZone() {
Quarter q = new Quarter(2, 1950);
TimeZone zone = TimeZone.getTimeZone("America/Los_Angeles");
Calendar c = new GregorianCalendar(zone);
assertEquals(-615488400001L, q.getLastMillisecond(c));
// try null calendar
boolean pass = false;
try {
q.getLastMillisecond((Calendar) null);
}
catch (NullPointerException e) {
pass = true;
}
assertTrue(pass);
}
示例4: testGetLastMillisecondWithCalendar
import org.jfree.data.time.Quarter; //导入方法依赖的package包/类
/**
* Some checks for the getLastMillisecond(TimeZone) method.
*/
public void testGetLastMillisecondWithCalendar() {
Quarter q = new Quarter(3, 2001);
GregorianCalendar calendar = new GregorianCalendar(Locale.GERMANY);
calendar.setTimeZone(TimeZone.getTimeZone("Europe/Frankfurt"));
assertEquals(1001894399999L, q.getLastMillisecond(calendar));
// try null calendar
boolean pass = false;
try {
q.getLastMillisecond((Calendar) null);
}
catch (NullPointerException e) {
pass = true;
}
assertTrue(pass);
}