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