Package icyllis.modernui.lifecycle

# Enum Class Lifecycle.Event

java.lang.Object
java.lang.Enum<Lifecycle.Event>
icyllis.modernui.lifecycle.Lifecycle.Event

All Implemented Interfaces:
  `Serializable`, `Comparable<Lifecycle.Event>`, `Constable`

Enclosing class:
  `Lifecycle`

public static enum Lifecycle.Event extends Enum<Lifecycle.Event>

- ## Nested Class Summary

  ## Nested classes/interfaces inherited from class java.lang.Enum

  `Enum.EnumDesc<E extends Enum<E>>`

- ## Enum Constant Summary

  Enum Constants
  Enum Constant
  Description
  `ON_CREATE`
  Constant for onCreate event of the `LifecycleOwner`.
  `ON_DESTROY`
  Constant for onDestroy event of the `LifecycleOwner`.
  `ON_PAUSE`
  Constant for onPause event of the `LifecycleOwner`.
  `ON_RESUME`
  Constant for onResume event of the `LifecycleOwner`.
  `ON_START`
  Constant for onStart event of the `LifecycleOwner`.
  `ON_STOP`
  Constant for onStop event of the `LifecycleOwner`.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static Lifecycle.Event`
  `downFrom(Lifecycle.State state)`
  Returns the `Lifecycle.Event` that will be reported by a `Lifecycle` leaving the specified `Lifecycle.State` to a lower state, or `null` if there is no valid event that can move down from the given state.
  `static Lifecycle.Event`
  `downTo(Lifecycle.State state)`
  Returns the `Lifecycle.Event` that will be reported by a `Lifecycle` entering the specified `Lifecycle.State` from a higher state, or `null` if there is no valid event that can move down to the given state.
  `Lifecycle.State`
  `getTargetState()`
  Returns the new `Lifecycle.State` of a `Lifecycle` that just reported this `Lifecycle.Event`.
  `static Lifecycle.Event`
  `upFrom(Lifecycle.State state)`
  Returns the `Lifecycle.Event` that will be reported by a `Lifecycle` leaving the specified `Lifecycle.State` to a higher state, or `null` if there is no valid event that can move up from the given state.
  `static Lifecycle.Event`
  `upTo(Lifecycle.State state)`
  Returns the `Lifecycle.Event` that will be reported by a `Lifecycle` entering the specified `Lifecycle.State` from a lower state, or `null` if there is no valid event that can move up to the given state.
  `static Lifecycle.Event`
  `valueOf(String name)`
  Returns the enum constant of this class with the specified name.
  `static Lifecycle.Event[]`
  `values()`
  Returns an array containing the constants of this enum class, in the order they are declared.

  ### Methods inherited from class java.lang.Enum

  `clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

  ### Methods inherited from class java.lang.Object

  `getClass, notify, notifyAll, wait, wait, wait`

- ## Enum Constant Details

  - ### ON_CREATE

    public static final Lifecycle.Event ON_CREATE
    Constant for onCreate event of the `LifecycleOwner`.

  - ### ON_START

    public static final Lifecycle.Event ON_START
    Constant for onStart event of the `LifecycleOwner`.

  - ### ON_RESUME

    public static final Lifecycle.Event ON_RESUME
    Constant for onResume event of the `LifecycleOwner`.

  - ### ON_PAUSE

    public static final Lifecycle.Event ON_PAUSE
    Constant for onPause event of the `LifecycleOwner`.

  - ### ON_STOP

    public static final Lifecycle.Event ON_STOP
    Constant for onStop event of the `LifecycleOwner`.

  - ### ON_DESTROY

    public static final Lifecycle.Event ON_DESTROY
    Constant for onDestroy event of the `LifecycleOwner`.

- ## Method Details

  - ### values

    public static Lifecycle.Event[] values()
    Returns an array containing the constants of this enum class, in the order they are declared.
    Returns:
      an array containing the constants of this enum class, in the order they are declared

  - ### valueOf

    public static Lifecycle.Event valueOf(String name)
    Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
    Parameters:
      `name` - the name of the enum constant to be returned.
    Returns:
      the enum constant with the specified name
    Throws:
      `IllegalArgumentException` - if this enum class has no constant with the specified name
      `NullPointerException` - if the argument is null

  - ### downFrom

    @Nullable public static Lifecycle.Event downFrom(@Nonnull Lifecycle.State state)
    Returns the `Lifecycle.Event` that will be reported by a `Lifecycle` leaving the specified `Lifecycle.State` to a lower state, or `null` if there is no valid event that can move down from the given state.
    Parameters:
      `state` - the higher state that the returned event will transition down from
    Returns:
      the event moving down the lifecycle phases from state

  - ### downTo

    @Nullable public static Lifecycle.Event downTo(@Nonnull Lifecycle.State state)
    Returns the `Lifecycle.Event` that will be reported by a `Lifecycle` entering the specified `Lifecycle.State` from a higher state, or `null` if there is no valid event that can move down to the given state.
    Parameters:
      `state` - the lower state that the returned event will transition down to
    Returns:
      the event moving down the lifecycle phases to state

  - ### upFrom

    @Nullable public static Lifecycle.Event upFrom(@Nonnull Lifecycle.State state)
    Returns the `Lifecycle.Event` that will be reported by a `Lifecycle` leaving the specified `Lifecycle.State` to a higher state, or `null` if there is no valid event that can move up from the given state.
    Parameters:
      `state` - the lower state that the returned event will transition up from
    Returns:
      the event moving up the lifecycle phases from state

  - ### upTo

    @Nullable public static Lifecycle.Event upTo(@Nonnull Lifecycle.State state)
    Returns the `Lifecycle.Event` that will be reported by a `Lifecycle` entering the specified `Lifecycle.State` from a lower state, or `null` if there is no valid event that can move up to the given state.
    Parameters:
      `state` - the higher state that the returned event will transition up to
    Returns:
      the event moving up the lifecycle phases to state

  - ### getTargetState

    @Nonnull public Lifecycle.State getTargetState()
    Returns the new `Lifecycle.State` of a `Lifecycle` that just reported this `Lifecycle.Event`.
    Returns:
      the state that will result from this event