- Type Parameters:
T
- Any value type
- All Implemented Interfaces:
- java.lang.Iterable<T>, java.util.Iterator<T>, IterableIterator<T>
public class IterableMapValue<T>
extends java.lang.Object
implements IterableIterator<T>
This class prepares an Map.entrySet()
to an Iterable
over the values.
The key is not used, but the key determines the order of the iteration.
But the key have to be of type String.
Note: You can also use Map.values()
to get a value iterator.
This class is not necessary. But one can see how an iterator works.
- Since:
- 2023-12-08 works with null as argument for a Map with
IterableMapValue(Map)
.
then hasNext()
returns false. This is sensible if a Map is not created, but this should not be checked.