当前位置: 首页>>代码示例>>Java>>正文


Java Week.getLastMillisecond方法代码示例

本文整理汇总了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);            
}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:19,代码来源:WeekTests.java

示例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);
}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:19,代码来源:WeekTests.java

示例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);
}
 
开发者ID:SpoonLabs,项目名称:astor,代码行数:27,代码来源:WeekTests.java

示例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);
}
 
开发者ID:SpoonLabs,项目名称:astor,代码行数:20,代码来源:WeekTests.java


注:本文中的org.jfree.data.time.Week.getLastMillisecond方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。