Class KeyValueType

Direct Known Subclasses:
MapType, MultimapType

public abstract class KeyValueType extends EnumerableType
  • Constructor Details

    • KeyValueType

      public KeyValueType(Type baseJavaType, int expectedArgs, TypeMapperLazy typeMapperLazy)
  • Method Details

    • getKeyJavaType

      public Type getKeyJavaType()
      never returns null
    • getValueJavaType

      public Type getValueJavaType()
      never returns null
    • filterToList

      public <T> List<T> filterToList(Object source, Class<T> filter)
      Description copied from class: EnumerableType
      Returns a new, unmodifiable Enumerable with filtered items, nulls are omitted.
      Overrides:
      filterToList in class EnumerableType
    • items

      protected Stream<Object> items(Object source)
      Specified by:
      items in class EnumerableType
    • entries

      protected abstract Stream<Map.Entry> entries(Object source)
    • getValueJaversType

      public JaversType getValueJaversType()
    • getKeyJaversType

      public JaversType getKeyJaversType()
    • canBePrototype

      public boolean canBePrototype()
      Specified by:
      canBePrototype in class JaversType
    • isInstance

      public boolean isInstance(Object cdo)
      Specified by:
      isInstance in class JaversType
    • getRawDehydratedType

      protected 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 Class getBaseJavaClass()