Class WildcardListModel<T>

  • Type Parameters:
    T - type of object inside list
    All Implemented Interfaces:
    de.alpharogroup.model.api.Attachable, de.alpharogroup.model.api.Detachable, de.alpharogroup.model.api.Model<java.util.List<T>>, de.alpharogroup.model.api.ObjectClassAware<java.util.List<T>>, java.io.Serializable

    public class WildcardListModel<T>
    extends GenericCollectionModel<java.util.List<T>>
    Based on Model but for lists of serializable objects.
    See Also:
    Serialized Form
    • Constructor Detail

      • WildcardListModel

        public WildcardListModel​(java.util.List<T> list)
        Creates model that will contain list.
        Parameters:
        list - the list
    • Method Detail

      • of

        public static <C> de.alpharogroup.model.api.Model<java.util.List<C>> of​(java.util.List<C> list)
        Factory method for models that contain lists. This factory method will automatically rebuild a nonserializable list into a serializable one.
        Type Parameters:
        C - model type
        Parameters:
        list - The List, which may or may not be Serializable
        Returns:
        A Model object wrapping the List
      • newSerializableCollectionOf

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