Class MapModel<K,​V>

    • Constructor Detail

      • MapModel

        public MapModel​(java.util.Map<K,​V> map)
        Creates model that will contain map.
        Parameters:
        map - the map
      • MapModel

        public MapModel()
    • Method Detail

      • ofMap

        public static <K,​V> IModel<java.util.Map<K,​V>> ofMap​(java.util.Map<K,​V> map)
        Factory method for models that contain maps. This factory method will automatically rebuild a nonserializable map into a serializable one.
        Type Parameters:
        K - key type in map
        V - value type in map
        Parameters:
        map - The Map, which may or may not be Serializable
        Returns:
        A IModel object wrapping the Map
      • newSerializableCollectionOf

        protected java.util.Map<K,​V> newSerializableCollectionOf​(java.util.Map<K,​V> object)
        Creates a serializable version of the object. The object is usually a collection.
        Specified by:
        newSerializableCollectionOf in class GenericCollectionModel<java.util.Map<K,​V>>
        Parameters:
        object - the object
        Returns:
        serializable version of object