當前位置: 首頁>>代碼示例>>Java>>正文


Java LocalTime.MIN屬性代碼示例

本文整理匯總了Java中java.time.LocalTime.MIN屬性的典型用法代碼示例。如果您正苦於以下問題:Java LocalTime.MIN屬性的具體用法?Java LocalTime.MIN怎麽用?Java LocalTime.MIN使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在java.time.LocalTime的用法示例。


在下文中一共展示了LocalTime.MIN屬性的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: getTask

/**
 * Creates and returns a new task if valid. Returns null if not valid.
 * @return Null if not valid or the new task if valid.
 */
public Task getTask() {
    //Verifications
    if (!nameFieldNewTask.getText().equals("")) {
        Task newTask = new Task(nameFieldNewTask.getText());
        
        if (datePicker.getValue() != null) {
            LocalDate date = datePicker.getValue();
            LocalTime mockTime = LocalTime.MIN;
            LocalDateTime dateTime = LocalDateTime.of(date, mockTime);
            newTask.setEndDate(dateTime);
        }
        
        return newTask;
    } else {
        return null;
    }
}
 
開發者ID:Soheibooo,項目名稱:EMBER,代碼行數:21,代碼來源:NewTaskController.java

示例2: testStockByCodeEndpoint

@Test
public void testStockByCodeEndpoint() throws Exception {
    final StockDto expectedStock =
            new StockDto("AMD", "AMD", "AMD", 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, LocalDate.MIN, LocalTime.MIN);
    given(this.stockService.getRealtimeStockSample(any()))
            .willReturn(Optional.of(expectedStock));

    mvc.perform(asyncDispatch(mvc.perform(get("/stocks/AMD").contentType(MediaType.APPLICATION_JSON_UTF8_VALUE))
                                      .andReturn()))
            .andDo(print())
            .andExpect(status().isOk())
            .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE))
            .andExpect(jsonPath("$.tool").value("AMD"))
            .andExpect(jsonPath("$.code").value("AMD"))
            .andExpect(jsonPath("$.name").value("AMD"))
            .andExpect(jsonPath("$.open").value(1.0))
            .andExpect(jsonPath("$.high").value(1.0))
            .andExpect(jsonPath("$.close").value(1.0))
            .andExpect(jsonPath("$.low").value(1.0))
            .andExpect(jsonPath("$.sellPrice").value(1.0))
            .andExpect(jsonPath("$.buyPrice").value(1.0));
}
 
開發者ID:mumukiller,項目名稱:stock-patterns-recognition,代碼行數:22,代碼來源:SamplesControllerIT.java

示例3: testStocksByCodeEndpoint

@Test
public void testStocksByCodeEndpoint() throws Exception {
    final StockDto expectedStock =
            new StockDto("AMD", "AMD", "AMD", 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, LocalDate.MIN, LocalTime.MIN);
    given(this.stockService.getRealtimeStocksSamples(any()))
            .willReturn(Stream.of(expectedStock));

    mvc.perform(asyncDispatch(mvc.perform(get("/stocks").contentType(MediaType.APPLICATION_JSON_UTF8_VALUE))
                                      .andReturn()))
            .andDo(print())
            .andExpect(status().isOk())
            .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE))
            .andExpect(jsonPath("$", hasSize(1)))
            .andExpect(jsonPath("$[0].tool").value("AMD"))
            .andExpect(jsonPath("$[0].code").value("AMD"))
            .andExpect(jsonPath("$[0].name").value("AMD"))
            .andExpect(jsonPath("$[0].open").value(1.0))
            .andExpect(jsonPath("$[0].high").value(1.0))
            .andExpect(jsonPath("$[0].close").value(1.0))
            .andExpect(jsonPath("$[0].low").value(1.0))
            .andExpect(jsonPath("$[0].sellPrice").value(1.0))
            .andExpect(jsonPath("$[0].buyPrice").value(1.0));
}
 
開發者ID:mumukiller,項目名稱:stock-patterns-recognition,代碼行數:23,代碼來源:SamplesControllerIT.java

示例4: 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

示例5: testCombinationFilter

/**
 * Test of filter method, of class EventFilter.
 *
 * @author juehv, aa80hifa
 */
@Test
public void testCombinationFilter() throws ParseException {
    Filter firstFilter = new EventFilter(VaultEntryType.HEART_RATE);
    Filter secondFilter = new TimePointFilter(LocalTime.MIN, 1);
    List<VaultEntry> data = StaticDataset.getStaticDataset();

    Filter combinationFilter = new CombinationFilter(data, firstFilter, secondFilter);
    FilterResult result = combinationFilter.filter(data);

    System.out.println(result.size());

}
 
開發者ID:tiweGH,項目名稱:OpenDiabetes,代碼行數:17,代碼來源:CombinationFilterTest.java

示例6: draw

public void draw() {
    final double width = getWidth();
    final double height = getHeight();

    GraphicsContext gc = getGraphicsContext2D();
    gc.clearRect(0, 0, width, height);

    if (entries != null && !entries.isEmpty()) {
        for (Entry<?> entry : entries) {
            com.calendarfx.model.Calendar calendar = entry.getCalendar();
            if (calendar == null) {
                continue;
            }

            Color color = getCalendarColor(calendar.getStyle());
            gc.setFill(color);

            if (entry.isFullDay()) {
                gc.fillRect(0, 0, width, height);
            } else {
                LocalTime startTime = entry.getStartTime();
                LocalTime endTime = entry.getEndTime();

                if (entry.getStartDate().isBefore(getDate())) {
                    startTime = LocalTime.MIN;
                }

                if (entry.getEndDate().isAfter(getDate())) {
                    endTime = LocalTime.MAX;
                }

                double y = height * (startTime.toSecondOfDay() / (double) LocalTime.MAX.toSecondOfDay());
                double h = height * (endTime.toSecondOfDay() / (double) LocalTime.MAX.toSecondOfDay());
                gc.fillRect(0, y, width, h - y);
            }
        }
    }
}
 
開發者ID:dlemmermann,項目名稱:CalendarFX,代碼行數:38,代碼來源:MonthSheetView.java

示例7: unknown

public static Pattern unknown() {
    return new PatternDto(PatternType.UNKNOWN,
                          LocalDate.MIN,
                          LocalTime.MIN,
                          LocalDate.MIN,
                          LocalTime.MIN);
}
 
開發者ID:mumukiller,項目名稱:stock-patterns-recognition,代碼行數:7,代碼來源:PatternDto.java

示例8: WeekView

public WeekView(ObjectProperty<LocalDate> dateBegin, int numberOfDays, Calendar... calendar) {
    this(dateBegin, numberOfDays, LocalTime.MIN, LocalTime.MAX, new WeekViewRenderer(), new FlexAppointmentFactory(), calendar);
}
 
開發者ID:Jibbow,項目名稱:FastisFX,代碼行數:3,代碼來源:WeekView.java

示例9: DayView

public DayView(ObjectProperty<LocalDate> date, Calendar... calendar) {
    this(date, LocalTime.MIN, LocalTime.MAX, new DayViewRenderer(), new FlexAppointmentFactory(), calendar);
}
 
開發者ID:Jibbow,項目名稱:FastisFX,代碼行數:3,代碼來源:DayView.java

示例10: trimTimeBounds

private void trimTimeBounds() {
    if (this instanceof WeekDayView) {
        return;
    }

    LoggingDomain.PRINTING.fine("trimming hours");

    LocalTime st = LocalTime.of(8, 0);
    LocalTime et = LocalTime.of(19, 0);

    LocalTime etu = getEarliestTimeUsed();
    LocalTime ltu = getLatestTimeUsed();

    LoggingDomain.PRINTING.fine("earliest time: " + etu + ", latest time: " + ltu);

    setEarlyLateHoursStrategy(EarlyLateHoursStrategy.HIDE);

    if (etu != null && ltu != null && ltu.isAfter(etu)) {
        // some padding before the first entry
        if (!etu.isBefore(LocalTime.of(1, 0))) {
            etu = etu.minusHours(1);
        } else {
            etu = LocalTime.MIN;
        }

        // some padding after the last entry
        if (!ltu.isAfter(LocalTime.of(23, 0))) {
            ltu = ltu.plusHours(1);
        } else {
            ltu = LocalTime.MAX;
        }

        // only adjust start time if it is too late
        if (etu.isBefore(st.plusHours(1))) {
            setStartTime(etu);
        } else {
            setStartTime(st);
        }

        // only adjust end time if it is too early
        if (ltu.isAfter(et.minusHours(1))) {
            setEndTime(ltu);
        } else {
            setEndTime(et);
        }
    } else {
        setStartTime(st);
        setEndTime(et);
    }

    setVisibleHours(Math.min(24, (int) getStartTime().until(getEndTime(), ChronoUnit.HOURS)));
}
 
開發者ID:dlemmermann,項目名稱:CalendarFX,代碼行數:52,代碼來源:DayViewBase.java

示例11: updateEntries

private void updateEntries(String reason) {
    displayedDate = getSkinnable().getDate();

    getChildren().removeIf(node -> node instanceof DayEntryView);

    Map<LocalDate, List<Entry<?>>> dataMap = new HashMap<>();
    dataLoader.loadEntries(dataMap);
    List<Entry<?>> entryList = dataMap.get(getSkinnable().getDate());

    LocalTime earliest = null;
    LocalTime latest = null;

    if (entryList != null) {
        entryList.removeIf(Entry::isFullDay);

        for (Entry<?> entry : entryList) {
            doAddEntryView(entry);

            if (earliest == null || entry.getStartTime().isBefore(earliest)) {
                earliest = entry.getStartTime();
            }

            if (entry.getStartDate().isBefore(getSkinnable().getDate())) {
                earliest = LocalTime.MIN;
            }

            if (latest == null || entry.getEndTime().isAfter(latest)) {
                latest = entry.getEndTime();
            }

            if (entry.getEndDate().isAfter(getSkinnable().getDate())) {
                latest = LocalTime.MAX;
            }
        }
    }

    getSkinnable().getProperties().put("earliest.time.used", earliest);
    getSkinnable().getProperties().put("latest.time.used", latest);

    getSkinnable().requestLayout();

    LoggingDomain.VIEW.fine("updating entries in day view " + getSkinnable().getDate() + ": reason = " + reason + ", entry count: " + getChildren().stream().filter(child -> child instanceof DayEntryView).count());
}
 
開發者ID:dlemmermann,項目名稱:CalendarFX,代碼行數:43,代碼來源:DayViewSkin.java

示例12: setup

@Before
public void setup() {
    interval = new Interval(LocalDate.now(), LocalTime.MIN, LocalDate.now(), LocalTime.MAX);
}
 
開發者ID:dlemmermann,項目名稱:CalendarFX,代碼行數:4,代碼來源:IntervalTest.java

示例13: testBodySizeOpenMoreClose

@Test
public void testBodySizeOpenMoreClose(){
    final OhlcContainer container = new SimpleOhlcContainer("AMD", "AMD", "AMD",10.0, 1.0, 1.0, 1.0, LocalDate.MIN, LocalTime.MIN);
    assertEquals(9.0, container.getBodysize());
}
 
開發者ID:mumukiller,項目名稱:stock-patterns-recognition,代碼行數:5,代碼來源:OhlcContainerTest.java

示例14: testBodySizeOpenLessClose

@Test
public void testBodySizeOpenLessClose(){
    final OhlcContainer container = new SimpleOhlcContainer("AMD", "AMD", "AMD", 1.0, 1.0, 1.0, 10.0, LocalDate.MIN, LocalTime.MIN);
    assertEquals(9.0, container.getBodysize());
}
 
開發者ID:mumukiller,項目名稱:stock-patterns-recognition,代碼行數:5,代碼來源:OhlcContainerTest.java

示例15: 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


注:本文中的java.time.LocalTime.MIN屬性示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。