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


Java LocalTime.NOON属性代码示例

本文整理汇总了Java中java.time.LocalTime.NOON属性的典型用法代码示例。如果您正苦于以下问题:Java LocalTime.NOON属性的具体用法?Java LocalTime.NOON怎么用?Java LocalTime.NOON使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在java.time.LocalTime的用法示例。


在下文中一共展示了LocalTime.NOON属性的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getZonedDateTimeAt

@Override
public final ZonedDateTime getZonedDateTimeAt(double x, double y) {
    int day = (int) (x / (getWidth() / getNumberOfDays()));

    LocalDate date = getDate();

    if (isAdjustToFirstDayOfWeek()) {
        date = Util.adjustToFirstDayOfWeek(date, getFirstDayOfWeek());
    }

    date = date.plusDays(day);

    LocalTime time = LocalTime.NOON;
    ZoneId zoneId = getZoneId();
    return ZonedDateTime.of(date, time, zoneId);
}
 
开发者ID:dlemmermann,项目名称:CalendarFX,代码行数:16,代码来源:AllDayView.java

示例2: data_adjustInto

@DataProvider(name="adjustInto")
Object[][] data_adjustInto() {
    return new Object[][]{
            {LocalTime.of(23, 5), LocalTime.of(4, 1, 1, 100), LocalTime.of(23, 5, 0, 0), null},
            {LocalTime.of(23, 5, 20), LocalTime.of(4, 1, 1, 100), LocalTime.of(23, 5, 20, 0), null},
            {LocalTime.of(23, 5, 20, 1000), LocalTime.of(4, 1, 1, 100), LocalTime.of(23, 5, 20, 1000), null},
            {LocalTime.of(23, 5, 20, 1000), LocalTime.MAX, LocalTime.of(23, 5, 20, 1000), null},
            {LocalTime.of(23, 5, 20, 1000), LocalTime.MIN, LocalTime.of(23, 5, 20, 1000), null},
            {LocalTime.of(23, 5, 20, 1000), LocalTime.NOON, LocalTime.of(23, 5, 20, 1000), null},
            {LocalTime.of(23, 5, 20, 1000), LocalTime.MIDNIGHT, LocalTime.of(23, 5, 20, 1000), null},
            {LocalTime.MAX, LocalTime.of(23, 5, 20, 1000), LocalTime.of(23, 59, 59, 999999999), null},
            {LocalTime.MIN, LocalTime.of(23, 5, 20, 1000), LocalTime.of(0, 0, 0), null},
            {LocalTime.NOON, LocalTime.of(23, 5, 20, 1000), LocalTime.of(12, 0, 0), null},
            {LocalTime.MIDNIGHT, LocalTime.of(23, 5, 20, 1000), LocalTime.of(0, 0, 0), null},

            {LocalTime.of(23, 5), LocalDateTime.of(2210, 2, 2, 1, 1), LocalDateTime.of(2210, 2, 2, 23, 5), null},
            {LocalTime.of(23, 5), OffsetTime.of(1, 1, 0, 0, OFFSET_PTWO), OffsetTime.of(23, 5, 0, 0, OFFSET_PTWO), null},
            {LocalTime.of(23, 5), OffsetDateTime.of(2210, 2, 2, 1, 1, 0, 0, OFFSET_PTWO), OffsetDateTime.of(2210, 2, 2, 23, 5, 0, 0, OFFSET_PTWO), null},
            {LocalTime.of(23, 5), ZonedDateTime.of(2210, 2, 2, 1, 1, 0, 0, ZONE_PARIS), ZonedDateTime.of(2210, 2, 2, 23, 5, 0, 0, ZONE_PARIS), null},

            {LocalTime.of(23, 5), LocalDate.of(2210, 2, 2), null, DateTimeException.class},
            {LocalTime.of(23, 5), null, null, NullPointerException.class},

    };
}
 
开发者ID:lambdalab-mirror,项目名称:jdk8u-jdk,代码行数:25,代码来源:TCKLocalTime.java

示例3: samples

@Override
protected List<TemporalAccessor> samples() {
    TemporalAccessor[] array = {TEST_12_30_40_987654321, LocalTime.MIN, LocalTime.MAX, LocalTime.MIDNIGHT, LocalTime.NOON};
    return Arrays.asList(array);
}
 
开发者ID:lambdalab-mirror,项目名称:jdk8u-jdk,代码行数:5,代码来源:TCKLocalTime.java

示例4: getNoonTime

public LocalTime getNoonTime() {
    return LocalTime.NOON;
}
 
开发者ID:donbeave,项目名称:graphql-java-datetime,代码行数:3,代码来源:Query.java


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