Class BaseModel<T>

    • Constructor Detail

      • BaseModel

        public BaseModel​(T object)
        Instantiates a new base model.
        Parameters:
        object - the object
      • BaseModel

        public BaseModel()
    • Method Detail

      • of

        public static <T> IModel<T> of()
        Factory methods for IModel which uses type inference to make code shorter. Equivalent to new BaseModel<TypeOfObject>().
        Type Parameters:
        T - the generic type
        Returns:
        IModel that contains object
      • of

        public static <T> IModel<T> of​(IModel<?> model)
        Supresses generics warning when converting model types.
        Type Parameters:
        T - the generic type
        Parameters:
        model - the model
        Returns:
        model
      • of

        public static <T> IModel<T> of​(T object)
        Factory methods for IModel which uses type inference to make code shorter. Equivalent to new BaseModel<TypeOfObject>(object).
        Type Parameters:
        T - the generic type
        Parameters:
        object - the object
        Returns:
        IModel that contains object