getAsDurationWithDefault method

Duration getAsDurationWithDefault (int index, Duration defaultValue)

Converts array element into a Duration or returns default value if conversion is not possible.

  • index an index of element to get.
  • defaultValue the default value Returns Duration value ot the element or default value if conversion is not supported.

See DurationConverter.toDurationWithDefault