public static TimeValue time( long nanosOfDayUTC, ZoneOffset offset ) { return new TimeValue( timeRaw( nanosOfDayUTC, offset ) ); }
static OffsetTime asValueRaw( long long0, long long1 ) { if ( TimeZones.validZoneOffset( (int) long1 ) ) { return TimeValue.timeRaw( long0, ZoneOffset.ofTotalSeconds( (int) long1 ) ); } // TODO Getting here means that after a proper read this value is plain wrong... shouldn't something be thrown instead? Yes and same for TimeZones return null; }
@Test public void shouldRangeSeekInOrderDescendingTime() throws Exception { Object o0 = TimeValue.timeRaw( 0, ZoneOffset.ofHours( 0 ) ); Object o1 = TimeValue.timeRaw( 1, ZoneOffset.ofHours( 0 ) ); Object o2 = TimeValue.timeRaw( 2, ZoneOffset.ofHours( 0 ) ); Object o3 = TimeValue.timeRaw( 3, ZoneOffset.ofHours( 0 ) ); Object o4 = TimeValue.timeRaw( 4, ZoneOffset.ofHours( 0 ) ); Object o5 = TimeValue.timeRaw( 5, ZoneOffset.ofHours( 0 ) ); shouldSeekInOrderExactWithRange( IndexOrder.DESCENDING, o0, o1, o2, o3, o4, o5 ); }
@Test public void shouldRangeSeekInOrderDescendingTime() throws Exception { Object o0 = TimeValue.timeRaw( 0, ZoneOffset.ofHours( 0 ) ); Object o1 = TimeValue.timeRaw( 1, ZoneOffset.ofHours( 0 ) ); Object o2 = TimeValue.timeRaw( 2, ZoneOffset.ofHours( 0 ) ); Object o3 = TimeValue.timeRaw( 3, ZoneOffset.ofHours( 0 ) ); Object o4 = TimeValue.timeRaw( 4, ZoneOffset.ofHours( 0 ) ); Object o5 = TimeValue.timeRaw( 5, ZoneOffset.ofHours( 0 ) ); shouldRangeSeekInOrder( IndexOrder.DESCENDING, o0, o1, o2, o3, o4, o5 ); }
@Test public void shouldRangeSeekInOrderAscendingTime() throws Exception { Object o0 = TimeValue.timeRaw( 0, ZoneOffset.ofHours( 0 ) ); Object o1 = TimeValue.timeRaw( 1, ZoneOffset.ofHours( 0 ) ); Object o2 = TimeValue.timeRaw( 2, ZoneOffset.ofHours( 0 ) ); Object o3 = TimeValue.timeRaw( 3, ZoneOffset.ofHours( 0 ) ); Object o4 = TimeValue.timeRaw( 4, ZoneOffset.ofHours( 0 ) ); Object o5 = TimeValue.timeRaw( 5, ZoneOffset.ofHours( 0 ) ); shouldSeekInOrderExactWithRange( IndexOrder.ASCENDING, o0, o1, o2, o3, o4, o5 ); }
@Test public void shouldRangeSeekInOrderAscendingTime() throws Exception { Object o0 = TimeValue.timeRaw( 0, ZoneOffset.ofHours( 0 ) ); Object o1 = TimeValue.timeRaw( 1, ZoneOffset.ofHours( 0 ) ); Object o2 = TimeValue.timeRaw( 2, ZoneOffset.ofHours( 0 ) ); Object o3 = TimeValue.timeRaw( 3, ZoneOffset.ofHours( 0 ) ); Object o4 = TimeValue.timeRaw( 4, ZoneOffset.ofHours( 0 ) ); Object o5 = TimeValue.timeRaw( 5, ZoneOffset.ofHours( 0 ) ); shouldRangeSeekInOrder( IndexOrder.ASCENDING, o0, o1, o2, o3, o4, o5 ); }
public static TimeValue time( long nanosOfDayUTC, ZoneOffset offset ) { return new TimeValue( timeRaw( nanosOfDayUTC, offset ) ); }
static OffsetTime asValueRaw( long long0, long long1 ) { if ( TimeZones.validZoneOffset( (int) long1 ) ) { return TimeValue.timeRaw( long0, ZoneOffset.ofTotalSeconds( (int) long1 ) ); } // TODO Getting here means that after a proper read this value is plain wrong... shouldn't something be thrown instead? Yes and same for TimeZones return null; }