java.lang.Object
org.seasar.doma.internal.util.PaddingIterator<E>
- Type Parameters:
E- the type of elements returned by this iterator
- All Implemented Interfaces:
Iterator<E>
An iterator that extends an existing
Iterator with padding behavior.
The PaddingIterator guarantees that additional elements will be yielded even after the
original iterator has been exhausted. These additional elements will repeat the last element
produced by the original iterator until the specified padding size is reached.
-
Constructor Summary
ConstructorsConstructorDescriptionPaddingIterator(Iterator<E> iterator, int paddingSize) Constructs aPaddingIteratorthat decorates the specifiedIteratorwith additional padding behavior. -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Iterator
forEachRemaining, remove
-
Constructor Details
-
PaddingIterator
Constructs aPaddingIteratorthat decorates the specifiedIteratorwith additional padding behavior.- Parameters:
iterator- the original iterator to be decorated; must not benullpaddingSize- the number of additional elements to produce after the original iterator is exhausted; must be>= 0- Throws:
NullPointerException- ifiteratorisnullIllegalArgumentException- ifpaddingSizeis less than 0
-
-
Method Details