Package icyllis.modernui.lifecycle

# Interface ViewModelProvider.Factory

All Known Implementing Classes:
  `ViewModelProvider.NewInstanceFactory`

Enclosing class:
  `ViewModelProvider`

Functional Interface:
  This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public static interface ViewModelProvider.Factory
Implementations of `Factory` interface are responsible to instantiate ViewModels.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `<T extends ViewModel>
  T`
  `create(Class<T> modelClass)`
  Creates a new instance of the given `Class`.

- ## Method Details

  - ### create

    @Nonnull <T extends ViewModel> T create(@Nonnull Class<T> modelClass)
    Creates a new instance of the given `Class`.

    Type Parameters:
      `T` - The type parameter for the ViewModel.
    Parameters:
      `modelClass` - a `Class` whose instance is requested
    Returns:
      a newly created ViewModel