Package eu.europa.esig.dss.spi.util
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 Summary
-
Constructor Summary
ConstructorDescriptionEmpty list of values.TimeDependentValues
(Iterable<T> srcList) Copy constructor. -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Field Details
-
list
The linked list of values
-
-
Constructor Details
-
TimeDependentValues
public TimeDependentValues()Empty list of values. -
TimeDependentValues
Copy constructor.- Parameters:
srcList
- an iterable of TimeDependent
-
-
Method Details
-
iterator
- Specified by:
iterator
in interfaceIterable<T extends TimeDependent>
-
getLatest
Gets the latest time dependent value- Returns:
- the latest time dependent value
-
getCurrent
Gets the value with the dated
if present- Parameters:
d
-Date
- Returns:
- the value with the date
d
if present, null otherwise
-
getAfter
Gets a list of time dependent values occurred afternotBefore
- Parameters:
notBefore
-Date
- Returns:
- a list of time dependent values
-
toString
-