Package org.javers.guava
Class MultimapType
- java.lang.Object
-
public class MultimapType extends KeyValueType
-
-
Field Summary
-
Fields inherited from class org.javers.core.metamodel.type.JaversType
DEFAULT_TYPE_PARAMETER
-
-
Constructor Summary
Constructors Constructor Description MultimapType(java.lang.reflect.Type baseJavaType, TypeMapperLazy typeMapperLazy)
-
Method Summary
All 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 container)
boolean
isInstance(java.lang.Object cdo)
java.lang.Object
map(java.lang.Object sourceEnumerable, java.util.function.Function mapFunction, boolean filterNulls)
Nulls keys are filteredcom.google.common.collect.Multimap
map(java.lang.Object sourceEnumerable, EnumerableFunction mapFunction, OwnerContext owner)
OwnerContext aware version ofEnumerableType.map(Object, EnumerableFunction, OwnerContext)
-
Methods inherited from class org.javers.core.metamodel.type.KeyValueType
filterToList, getKeyJavaType, getKeyJaversType, getValueJavaType, getValueJaversType, items
-
Methods inherited from class org.javers.core.metamodel.type.EnumerableType
getTypeMapperLazy, map, spawnConstructorArgs, spawnConstructorArgTypes
-
Methods inherited from class org.javers.core.metamodel.type.JaversType
equals, equals, getBaseJavaType, getConcreteClassTypeArguments, getName, hashCode, isGenericType, prettyPrint, prettyPrintBuilder, toString
-
-
-
-
Constructor Detail
-
MultimapType
public MultimapType(java.lang.reflect.Type baseJavaType, TypeMapperLazy typeMapperLazy)
-
-
Method Detail
-
map
public com.google.common.collect.Multimap 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 Multimap
-
isEmpty
public boolean isEmpty(java.lang.Object container)
- Specified by:
isEmpty
in classEnumerableType
-
map
public java.lang.Object map(java.lang.Object sourceEnumerable, java.util.function.Function mapFunction, boolean filterNulls)
Nulls keys are filtered- Specified by:
map
in classEnumerableType
-
entries
protected java.util.stream.Stream<java.util.Map.Entry> entries(java.lang.Object source)
- Specified by:
entries
in classKeyValueType
-
empty
public java.lang.Object empty()
- Specified by:
empty
in classEnumerableType
-
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()
-
-