public final class OptIter<T>
extends java.lang.Object
implements java.lang.Iterable<T>
Iterable to iterate an Optional value. If the value is present this will iterate exactly one value, otherwise it will iterate no values.| Constructor and Description |
|---|
OptIter(Optional<T> optional)
Create an
Iterable from the given Optional. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object obj) |
int |
hashCode() |
java.util.Iterator<T> |
iterator() |