Package 

Class Models


  • 
    public final class Models
    
                        

    The Models class provides a way to manage and access models that collect and expose data. Custom models can be added to the collection as long as they do not conflict with base models. The following base models are always included and cannot be overridden:

    • Constructor Summary

      Constructors 
      Constructor Description
      Models(Model<?> customModels) Creates a new collection of models including the specified custom models.
    • Method Summary

      Modifier and Type Method Description
      final <T extends Model<?>> T get(Class<T> clazz) Retrieves a model of the specified class.
      final <T extends Model<?>> T get() Retrieves a model of the specified class.
      final <ERROR CLASS> all() Retrieves all models in the collection.
      final <T extends Model<?>> Unit plusAssign(T model) Adds a custom model to the collection.
      final <T extends Model<?>> Unit add(T model) Adds a custom model to the collection.
      final <T extends Model<?>> <ERROR CLASS> remove() Removes a model of the specified type from the collection.
      final <T extends Model<?>> Unit remove(KClass<T> clazz) Removes a model of the specified type from the collection.
      final <T extends Model<?>> Unit remove(Class<T> clazz) Removes a model of the specified type from the collection.
      final <T extends Model<?>> Unit minusAssign(KClass<T> model) Removes a model of the specified type from the collection.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Models

        Models(Model<?> customModels)
        Creates a new collection of models including the specified custom models.
        Parameters:
        customModels - Custom models to be added to the collection.
    • Method Detail

      • get

         final <T extends Model<?>> T get(Class<T> clazz)

        Retrieves a model of the specified class.

        Parameters:
        clazz - The class, which is type T, of the model to retrieve.
      • get

         final <T extends Model<?>> T get()

        Retrieves a model of the specified class.

      • all

         final <ERROR CLASS> all()

        Retrieves all models in the collection.

      • plusAssign

         final <T extends Model<?>> Unit plusAssign(T model)

        Adds a custom model to the collection.

        Parameters:
        model - The custom model to add.
      • add

         final <T extends Model<?>> Unit add(T model)

        Adds a custom model to the collection.

        Parameters:
        model - The custom model to add.
      • remove

         final <T extends Model<?>> <ERROR CLASS> remove()

        Removes a model of the specified type from the collection.

      • remove

         final <T extends Model<?>> Unit remove(KClass<T> clazz)

        Removes a model of the specified type from the collection.

        Parameters:
        clazz - The class, which is type T, of the model to remove.
      • remove

         final <T extends Model<?>> Unit remove(Class<T> clazz)

        Removes a model of the specified type from the collection.

        Parameters:
        clazz - The class, which is type T, of the model to remove.