-
- All Superinterfaces:
ScalarTyped
,ScalarValued
,TokenTyped
,TokenValued
- All Known Subinterfaces:
DurationInputField
,DurationValuedIterator
- All Known Implementing Classes:
DurationRegister
,DurationToken
,NullToken
public interface DurationValued extends ScalarValued
ATokenValued
object containing a Duration value.- See Also:
TokenTypeConstant#DURATION
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Duration
asDuration()
Gets the contained Duration value as ajava.time.Duration
.long
asSeconds()
Get the contained duration value as the number of seconds.int
subsecNanos()
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()
,null
is 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()
,0
is 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()
,0
is returned. - See Also:
asSeconds()
-
-