Package org.javers.core.metamodel.type
Class EnumerableType
- java.lang.Object
-
- org.javers.core.metamodel.type.JaversType
-
- org.javers.core.metamodel.type.EnumerableType
-
- Direct Known Subclasses:
ContainerType,KeyValueType
public abstract class EnumerableType extends JaversType
Collection or Array or Map
-
-
Field Summary
-
Fields inherited from class org.javers.core.metamodel.type.JaversType
DEFAULT_TYPE_PARAMETER
-
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description booleancanBePrototype()abstract java.lang.Objectempty()java.lang.ClassgetBaseJavaClass()protected java.lang.reflect.TypegetRawDehydratedType()Type for JSON representation.abstract booleanisEmpty(java.lang.Object container)booleanisInstance(java.lang.Object cdo)abstract java.lang.Objectmap(java.lang.Object sourceEnumerable, java.util.function.Function mapFunction)Returns new instance of Enumerable with items from sourceEnumerable mapped by mapFunction.
Nulls are filteredabstract java.lang.Objectmap(java.lang.Object sourceEnumerable, EnumerableFunction mapFunction, OwnerContext owner)OwnerContext aware version ofmap(Object, EnumerableFunction, OwnerContext)-
Methods inherited from class org.javers.core.metamodel.type.JaversType
equals, equals, getBaseJavaType, getConcreteClassTypeArguments, getName, hashCode, isGenericType, prettyPrint, prettyPrintBuilder, toString
-
-
-
-
Method Detail
-
map
public abstract java.lang.Object map(java.lang.Object sourceEnumerable, EnumerableFunction mapFunction, OwnerContext owner)OwnerContext aware version ofmap(Object, EnumerableFunction, OwnerContext)- Returns:
- immutable Enumerable
-
map
public abstract java.lang.Object map(java.lang.Object sourceEnumerable, java.util.function.Function mapFunction)Returns new instance of Enumerable with items from sourceEnumerable mapped by mapFunction.
Nulls are filtered
-
isEmpty
public abstract boolean isEmpty(java.lang.Object container)
-
empty
public abstract java.lang.Object empty()
-
canBePrototype
public boolean canBePrototype()
- Specified by:
canBePrototypein classJaversType
-
isInstance
public boolean isInstance(java.lang.Object cdo)
- Specified by:
isInstancein classJaversType
-
getRawDehydratedType
protected java.lang.reflect.Type getRawDehydratedType()
Type for JSON representation. For Values it's simply baseJavaType. For ManagedTypes (references to Entities and ValueObjects) it's GlobalId because JaVers serializes references in the 'dehydrated' form.
-
getBaseJavaClass
public java.lang.Class getBaseJavaClass()
-
-