Class TemporalToDate
- All Implemented Interfaces:
Iterable<Date>
,Collection<Date>
A collection where conversion from
Temporal
to Date
objects are performed on-the-fly.
This is used for handling legacy metadata, before the move to java.time
.
This adapter may be deleted after deprecated metadata methods have been removed from Apache SIS.- Since:
- 1.3
- Version:
- 1.3
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Collection
<? extends Temporal> The collection of dates. -
Constructor Summary
ConstructorsConstructorDescriptionTemporalToDate
(Collection<? extends Temporal> source) Creates a new view over the given collection. -
Method Summary
Methods inherited from class java.util.AbstractCollection
add, addAll, clear, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Collection
equals, hashCode, parallelStream, removeIf, spliterator, stream, toArray
-
Field Details
-
source
The collection of dates.
-
-
Constructor Details
-
TemporalToDate
Creates a new view over the given collection.- Parameters:
source
- the collection of dates to wrap.
-
-
Method Details
-
size
public int size()Returns the number of dates in this collection.- Specified by:
size
in interfaceCollection<Date>
- Specified by:
size
in classAbstractCollection<Date>
- Returns:
- number of dates.
-
iterator
Returns an iterator over the dates in this collection.- Specified by:
iterator
in interfaceCollection<Date>
- Specified by:
iterator
in interfaceIterable<Date>
- Specified by:
iterator
in classAbstractCollection<Date>
- Returns:
- an iterator over the dates.
-