Package org.javers.core.metamodel.type
Class MapType
- java.lang.Object
-
- org.javers.core.metamodel.type.JaversType
-
- org.javers.core.metamodel.type.EnumerableType
-
- org.javers.core.metamodel.type.KeyValueType
-
- org.javers.core.metamodel.type.MapType
-
public class MapType extends KeyValueType
-
-
Field Summary
-
Fields inherited from class org.javers.core.metamodel.type.JaversType
DEFAULT_TYPE_PARAMETER
-
-
Constructor Summary
Constructors Constructor Description MapType(java.lang.reflect.Type baseJavaType)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
canBePrototype()
java.lang.Object
empty()
protected java.util.stream.Stream<java.util.Map.Entry>
entries(java.lang.Object source)
java.lang.Class
getBaseJavaClass()
java.lang.Class<?>
getEnumerableInterface()
protected java.lang.reflect.Type
getRawDehydratedType()
Type for JSON representation.boolean
isEmpty(java.lang.Object map)
boolean
isInstance(java.lang.Object cdo)
java.lang.Object
map(java.lang.Object source, java.util.function.Function mapFunction, boolean filterNulls)
java.lang.Object
map(java.lang.Object sourceEnumerable, EnumerableFunction mapFunction, OwnerContext owner)
OwnerContext aware version ofEnumerableType.map(Object, EnumerableFunction, OwnerContext)
static void
mapEntrySet(java.util.Collection<java.util.Map.Entry<?,?>> sourceEntries, java.util.function.Function mapFunction, java.util.function.BiConsumer entryConsumer, boolean filterNulls)
static void
mapEntrySet(java.util.Collection<java.util.Map.Entry<?,?>> sourceEntries, EnumerableFunction mapFunction, MapEnumerationOwnerContext mapEnumerationContext, java.util.function.BiConsumer entryConsumer)
static java.util.Map
mapStatic(java.lang.Object sourceEnumerable, EnumerableFunction mapFunction, OwnerContext owner)
-
Methods inherited from class org.javers.core.metamodel.type.KeyValueType
filterToList, getKeyType, getValueType, items
-
Methods inherited from class org.javers.core.metamodel.type.EnumerableType
map
-
Methods inherited from class org.javers.core.metamodel.type.JaversType
equals, equals, getBaseJavaType, getConcreteClassTypeArguments, getName, hashCode, isGenericType, prettyPrint, prettyPrintBuilder, toString
-
-
-
-
Method Detail
-
map
public java.lang.Object map(java.lang.Object sourceEnumerable, EnumerableFunction mapFunction, OwnerContext owner)
Description copied from class:EnumerableType
OwnerContext aware version ofEnumerableType.map(Object, EnumerableFunction, OwnerContext)
- Specified by:
map
in classEnumerableType
- Returns:
- immutable Enumerable
-
mapStatic
public static java.util.Map mapStatic(java.lang.Object sourceEnumerable, EnumerableFunction mapFunction, OwnerContext owner)
- Returns:
- immutable Map
-
map
public java.lang.Object map(java.lang.Object source, java.util.function.Function mapFunction, boolean filterNulls)
- Specified by:
map
in classEnumerableType
-
isEmpty
public boolean isEmpty(java.lang.Object map)
- Specified by:
isEmpty
in classEnumerableType
-
mapEntrySet
public static void mapEntrySet(java.util.Collection<java.util.Map.Entry<?,?>> sourceEntries, EnumerableFunction mapFunction, MapEnumerationOwnerContext mapEnumerationContext, java.util.function.BiConsumer entryConsumer)
-
mapEntrySet
public static void mapEntrySet(java.util.Collection<java.util.Map.Entry<?,?>> sourceEntries, java.util.function.Function mapFunction, java.util.function.BiConsumer entryConsumer, boolean filterNulls)
-
empty
public java.lang.Object empty()
- Specified by:
empty
in classEnumerableType
-
entries
protected java.util.stream.Stream<java.util.Map.Entry> entries(java.lang.Object source)
- Specified by:
entries
in classKeyValueType
-
getEnumerableInterface
public java.lang.Class<?> getEnumerableInterface()
- Specified by:
getEnumerableInterface
in classEnumerableType
-
canBePrototype
public boolean canBePrototype()
- Specified by:
canBePrototype
in classJaversType
-
isInstance
public boolean isInstance(java.lang.Object cdo)
- Specified by:
isInstance
in 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()
-
-