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>
  • Enum Constant Details

  • 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