List of usage examples for java.time Year MAX_VALUE
int MAX_VALUE
To view the source code for java.time Year MAX_VALUE.
Click Source Link
From source file:Main.java
public static void main(String[] args) { int i = Year.MAX_VALUE; System.out.println(i); }
From source file:com.qwazr.externalizor.SimpleTime.java
public SimpleTime() { calNullValue = null;/* w w w . j a v a 2s .c om*/ calValue = Calendar.getInstance(); calValue.setTimeInMillis(RandomUtils.nextLong()); calArray = new Calendar[] { calNullValue, calValue }; calList = new ArrayList(Arrays.asList(calValue, calNullValue)); dateNullValue = null; dateValue = new Date(RandomUtils.nextLong()); dateArray = new Date[] { dateNullValue, dateValue }; dateList = new ArrayList(Arrays.asList(dateValue, dateNullValue)); durationNullValue = null; durationValue = Duration.ofSeconds(RandomUtils.nextLong()); durationArray = new Duration[] { durationNullValue, durationValue }; durationList = new ArrayList(Arrays.asList(durationValue, durationNullValue)); instantNullValue = null; instantValue = Instant.ofEpochSecond(RandomUtils.nextLong(0, Instant.MAX.getEpochSecond())); instantArray = new Instant[] { instantNullValue, instantValue }; instantList = new ArrayList(Arrays.asList(instantValue, instantNullValue)); localTimeNullValue = null; localTimeValue = LocalTime.of(RandomUtils.nextInt(0, 24), RandomUtils.nextInt(0, 60), RandomUtils.nextInt(0, 60)); localTimeArray = new LocalTime[] { localTimeNullValue, localTimeValue }; localTimeList = new ArrayList(Arrays.asList(localTimeValue, localTimeNullValue)); localDateNullValue = null; localDateValue = LocalDate.of(RandomUtils.nextInt(2000, 3000), RandomUtils.nextInt(1, 13), RandomUtils.nextInt(1, 29)); localDateArray = new LocalDate[] { localDateNullValue, localDateValue }; localDateList = new ArrayList(Arrays.asList(localDateValue, localDateNullValue)); localDateTimeNullValue = null; localDateTimeValue = LocalDateTime.of( LocalDate.of(RandomUtils.nextInt(2000, 3000), RandomUtils.nextInt(1, 13), RandomUtils.nextInt(1, 29)), LocalTime.of(RandomUtils.nextInt(0, 24), RandomUtils.nextInt(0, 60), RandomUtils.nextInt(0, 60))); localDateTimeArray = new LocalDateTime[] { localDateTimeNullValue, localDateTimeValue }; localDateTimeList = new ArrayList(Arrays.asList(localDateTimeValue, localDateTimeNullValue)); monthDayNullValue = null; monthDayValue = MonthDay.of(RandomUtils.nextInt(1, 13), RandomUtils.nextInt(1, 29)); monthDayArray = new MonthDay[] { monthDayNullValue, monthDayValue }; monthDayList = new ArrayList(Arrays.asList(monthDayValue, monthDayNullValue)); periodNullValue = null; periodValue = Period.of(RandomUtils.nextInt(0, Year.MAX_VALUE), RandomUtils.nextInt(1, 13), RandomUtils.nextInt(1, 29)); periodArray = new Period[] { periodNullValue, periodValue }; periodList = new ArrayList(Arrays.asList(periodValue, periodNullValue)); yearNullValue = null; yearValue = Year.of(RandomUtils.nextInt(0, Year.MAX_VALUE)); yearArray = new Year[] { yearNullValue, yearValue }; yearList = new ArrayList(Arrays.asList(yearValue, yearNullValue)); }