Class TimeDependentValues<T extends TimeDependent>

java.lang.Object
eu.europa.esig.dss.spi.util.TimeDependentValues<T>
Type Parameters:
T - sub type of TimeDependent
All Implemented Interfaces:
Serializable, Iterable<T>
Direct Known Subclasses:
MutableTimeDependentValues

public class TimeDependentValues<T extends TimeDependent> extends Object implements Iterable<T>, Serializable
Immutable list of time-dependent values, with the latest value first.
Author:
jdvorak
See Also:
  • Field Details

  • Constructor Details

    • TimeDependentValues

      public TimeDependentValues()
      Empty list of values.
    • TimeDependentValues

      public TimeDependentValues(Iterable<T> srcList)
      Copy constructor.
      Parameters:
      srcList - an iterable of TimeDependent
  • Method Details

    • iterator

      public Iterator<T> iterator()
      Specified by:
      iterator in interface Iterable<T extends TimeDependent>
    • getLatest

      public T getLatest()
      Gets the latest time dependent value
      Returns:
      the latest time dependent value
    • getCurrent

      public T getCurrent(Date d)
      Gets the value with the date d if present
      Parameters:
      d - Date
      Returns:
      the value with the date d if present, null otherwise
    • getAfter

      public List<T> getAfter(Date notBefore)
      Gets a list of time dependent values occurred after notBefore
      Parameters:
      notBefore - Date
      Returns:
      a list of time dependent values
    • toString

      public String toString()
      Overrides:
      toString in class Object