-
- All Superinterfaces:
ScalarTyped,ScalarValued,TokenTyped,TokenValued
- All Known Subinterfaces:
DurationInputField,DurationValuedIterator
- All Known Implementing Classes:
DurationRegister,DurationToken,NullToken
public interface DurationValued extends ScalarValued
ATokenValuedobject containing a Duration value.- See Also:
TokenTypeConstant#DURATION
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description DurationasDuration()Gets the contained Duration value as ajava.time.Duration.longasSeconds()Get the contained duration value as the number of seconds.intsubsecNanos()Get the subsecond portion of the contained duration value.-
Methods inherited from interface com.pervasive.datarush.tokens.scalar.ScalarValued
getType, isZero
-
Methods inherited from interface com.pervasive.datarush.tokens.TokenValued
isNull
-
-
-
-
Method Detail
-
asDuration
Duration asDuration()
Gets the contained Duration value as ajava.time.Duration.- Returns:
- the contained value as a
java.time.Duration. If null valued, as indicated byTokenValued.isNull(),nullis returned.
-
asSeconds
long asSeconds()
Get the contained duration value as the number of seconds.- Returns:
- the contained value as seconds.
If null valued, as indicated by
TokenValued.isNull(),0is returned. - See Also:
subsecNanos()
-
subsecNanos
int subsecNanos()
Get the subsecond portion of the contained duration value.- Returns:
- the subsecond portion of the contained value, in
nanoseconds. If null valued, as indicated by
TokenValued.isNull(),0is returned. - See Also:
asSeconds()
-
-