Class MapBackedNativeCollection<U extends java.util.Collection<T>,​T>

  • Type Parameters:
    U - Type of Collection (ie: List, Set)
    T - Type of component (ie: Java Primitives and things like Strings; NOT entities)

    public class MapBackedNativeCollection<U extends java.util.Collection<T>,​T>
    extends MapBackedCollection<java.util.Collection<T>,​T>
    For Java Primitives and things like Strings (ie: NOT entities)
    • Constructor Detail

      • MapBackedNativeCollection

        public MapBackedNativeCollection​(java.util.Map sourceMap,
                                         java.lang.String property,
                                         java.util.Collection valueIfMissing)
        Construct a MapBackedNativeCollection with a certain property name and default value
        Parameters:
        sourceMap - Map to store the Collection in
        property - Key name of the property
        valueIfMissing - value to set if missing
      • MapBackedNativeCollection

        public MapBackedNativeCollection​(java.util.Map sourceMap,
                                         java.lang.String property)
        Construct a MapBackedNativeCollection with a certain property name
        Parameters:
        sourceMap - Map to store the Collection in
        property - Key name of the property
    • Method Detail

      • toMap

        protected java.lang.Object toMap​(T o)
        Description copied from class: MapBackedCollection
        Return the internal map where the MapBackedCollection is stored
        Specified by:
        toMap in class MapBackedCollection<java.util.Collection<T>,​T>
        Parameters:
        o - the object whose map will be returned
        Returns:
        the raw map for the passed in Object