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


Java LocalDate.MAX属性代码示例

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


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

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

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

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

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