public class OptionalType extends CollectionType
| Constructor and Description |
|---|
OptionalType() |
OptionalType(java.lang.reflect.Type baseJavaType) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
isEmpty(java.lang.Object optional) |
boolean |
isFullyParametrized()
returns true if Enumerable is generic Type and all its arguments are actual Classes
|
java.lang.Object |
map(java.lang.Object sourceOptional_,
EnumerableFunction mapFunction,
OwnerContext owner)
Returns new instance of Enumerable with items from sourceEnumerable mapped by mapFunction.
|
java.lang.Object |
mapAndGet(java.lang.Object sourceOptional,
Function mapFunction) |
java.lang.Object |
normalize(java.lang.Object sourceOptional)
converts nulls to Optional.empty()
|
getItemClass, getItemTypeequals, getActualTypeArguments, getBaseJavaClass, getBaseJavaType, getName, hashCode, isGenericType, isInstance, prettyPrint, prettyPrintBuilder, toStringpublic OptionalType(java.lang.reflect.Type baseJavaType)
public OptionalType()
public boolean isFullyParametrized()
EnumerableTypeisFullyParametrized in class CollectionTypepublic java.lang.Object map(java.lang.Object sourceOptional_,
EnumerableFunction mapFunction,
OwnerContext owner)
EnumerableTypemap in class EnumerableTypepublic boolean isEmpty(java.lang.Object optional)
isEmpty in class CollectionTypepublic java.lang.Object mapAndGet(java.lang.Object sourceOptional,
Function mapFunction)
public java.lang.Object normalize(java.lang.Object sourceOptional)