Interface DurationValued

All Superinterfaces:
ScalarTyped, ScalarValued, TokenTyped, TokenValued
All Known Subinterfaces:
DurationInputField, DurationValuedIterator
All Known Implementing Classes:
DurationRegister, DurationToken, NullToken

public interface DurationValued extends ScalarValued
A TokenValued object containing a Duration value.
See Also:
  • TokenTypeConstant#DURATION
  • Method Summary

    Modifier and Type
    Method
    Description
    Gets the contained Duration value as a java.time.Duration.
    long
    Get the contained duration value as the number of seconds.
    int
    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 Details

    • asDuration

      Duration asDuration()
      Gets the contained Duration value as a java.time.Duration.
      Returns:
      the contained value as a java.time.Duration. If null valued, as indicated by TokenValued.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

      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: