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


Java LocalDate.MIN属性代码示例

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


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

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

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

示例3: setUp

@BeforeMethod
public void setUp() {
    TEST_2007_07_15 = LocalDate.of(2007, 7, 15);

    LocalDate max = LocalDate.MAX;
    LocalDate min = LocalDate.MIN;
    MAX_VALID_EPOCHDAYS = max.toEpochDay();
    MIN_VALID_EPOCHDAYS = min.toEpochDay();
    MAX_DATE = max;
    MIN_DATE = min;
    MAX_INSTANT = max.atStartOfDay(ZoneOffset.UTC).toInstant();
    MIN_INSTANT = min.atStartOfDay(ZoneOffset.UTC).toInstant();
}
 
开发者ID:lambdalab-mirror,项目名称:jdk8u-jdk,代码行数:13,代码来源:TCKLocalDate.java

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

示例5: main

public static void main(String[] args) throws XPathExpressionException,
			ParserConfigurationException, SAXException, IOException,
			TransformerException {

		char separator = '+';
		DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ISO_LOCAL_DATE;
		boolean filterFrom = false;
		boolean filterTo = false;
		boolean applyKeywordSearch = false;
		LocalDate fromDate = LocalDate.MIN;
		LocalDate toDate = LocalDate.MAX;
		String keyword = "";

		// Load the Data into FusableDataSet
		FusibleDataSet<Event, Attribute> fusibleDataSetD = new FusibleHashedDataSet<>();
//		fusibleDataSetD.loadFromTSV(new File("WDI/usecase/event/input/dbpedia-1_s.tsv"),
//				new EventFactory(dateTimeFormatter, filterFrom, fromDate, filterTo, toDate, applyKeywordSearch, keyword), "events/event", separator, dateTimeFormatter, false, fromDate, false, toDate, true, keyword);


		FusibleDataSet<Event, Attribute> fusibleDataSetY = new FusibleHashedDataSet<>();
//		fusibleDataSetY.loadFromTSV(new File("WDI/usecase/event/input/yago-1_s.tsv"),
//				new EventFactory(dateTimeFormatter, filterFrom, fromDate, filterTo, toDate, applyKeywordSearch, keyword), "events/event", separator, dateTimeFormatter, false, fromDate, false, toDate, true, keyword);


		runDataFusion(fusibleDataSetD,
				fusibleDataSetY,
				//null,
				separator, dateTimeFormatter, filterFrom, fromDate, filterTo, toDate, applyKeywordSearch, keyword);

	}
 
开发者ID:olehmberg,项目名称:winter,代码行数:30,代码来源:Events_DataFusion_Main.java

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

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

示例8: samples

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

示例9: testCrossSectionalReturns

@Test()
public void testCrossSectionalReturns() throws Exception {
    LocalDate startDate = LocalDate.MIN;
    LocalDate endDate = LocalDate.MAX;
    final Index<LocalDate> rowKeys = Index.of(LocalDate.class, 100);
    final Index<String> tickers = Index.of("BLK", "CSCO", "SPY", "YHOO", "VNQI", "VGLT", "VCLT");
    final DataFrame<LocalDate,String> closePrices = DataFrame.ofDoubles(rowKeys, tickers);
    for (String ticker : tickers) {
        System.out.println("Loading data for ticker " + ticker);
        final DataFrame<LocalDate,String> quotes = TestDataFrames.getQuotes(ticker);
        quotes.tail(10).out().print();
        closePrices.rows().addAll(quotes.rows().keyArray());
        final LocalDate firstKey = quotes.rows().firstKey().get();
        final LocalDate lastKey = quotes.rows().lastKey().get();
        startDate = firstKey.isAfter(startDate) ? firstKey : startDate;
        endDate = lastKey.isBefore(endDate) ? lastKey : endDate;
        quotes.rows().forEach(row -> {
            final LocalDate date = row.key();
            final double price = row.getDouble("Adj Close");
            closePrices.data().setDouble(date, ticker, price);
        });
    }

    final Set<LocalDate> nanDates = new HashSet<>();
    closePrices.rows().forEach(row -> row.forEachValue(v -> {
        final double value = v.getDouble();
        if (Double.isNaN(value)) {
            final LocalDate rowKey = row.key();
            nanDates.add(rowKey);
            if (rowKey.getYear() == 2014) {
                System.out.println(rowKey);
            }
        }
    }));

    final DataFrame<LocalDate,String> selection = closePrices.rows().select(row -> !nanDates.contains(row.key()));
    final DataFrame<LocalDate,String> sorted = selection.rows().sort((row1, row2) -> row1.key().compareTo(row2.key()));
    final DataFrame<LocalDate,String> returns = sorted.calc().percentChanges();
    returns.rows().first().get().applyDoubles(v -> 0d);
    returns.head(10).out().print();
    returns.cols().stats().correlation().out().print();
}
 
开发者ID:zavtech,项目名称:morpheus-core,代码行数:42,代码来源:QuoteTests.java


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