# Enum PositionState

java.lang.Object
java.lang.Enum<PositionState>
com.codename1.home.PositionState

All Implemented Interfaces:
  `Comparable<PositionState>`

public enum PositionState extends Enum<PositionState>

Which way a window covering is moving, for `Trait.COVERING_MOTION`. Read-only on every backend.

Phrased in terms of opening and closing rather than of the position number going up or down, because the two backends disagree about which direction that number runs -- see `Trait.COVERING_POSITION`. "Opening" here always means moving toward daylight.

- ## Enum Constant Summary

  Enum Constants
  Enum Constant
  Description
  `CLOSING`
  Moving toward fully closed.
  `OPENING`
  Moving toward fully open.
  `STOPPED`
  Not moving.
  `UNKNOWN`
  The accessory could not say.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static PositionState`
  `of(TraitValue value)`
  Reads a motion state out of a trait value, total: a value that is not an enum, or whose ordinal is outside this set, answers `UNKNOWN`.
  `static PositionState`
  `valueOf(String name)`
  Returns the enum constant of this type with the specified name.
  `static PositionState[]`
  `values()`
  Returns an array containing the constants of this enum type, in the order they are declared.

  ### Methods inherited from class Enum

  `clone, compareTo, equals, getDeclaringClass, getEnumValues, hashCode, name, ordinal, setEnumValues, toString, valueOf`

  ### Methods inherited from class Object

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

- ## Enum Constant Details

  - ### STOPPED

    public static final PositionState STOPPED
    Not moving.

  - ### OPENING

    public static final PositionState OPENING
    Moving toward fully open.

  - ### CLOSING

    public static final PositionState CLOSING
    Moving toward fully closed.

  - ### UNKNOWN

    public static final PositionState UNKNOWN
    The accessory could not say.

- ## Method Details

  - ### values

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

  - ### valueOf

    public static PositionState valueOf(String name)
    Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified name
      `NullPointerException` - if the argument is null

  - ### of

    public static PositionState of(TraitValue value)

    Reads a motion state out of a trait value, total: a value that is not an enum, or whose ordinal is outside this set, answers `UNKNOWN`.

    ###### Parameters

    - `value`: a value read from `Trait.COVERING_MOTION`, or `null`

    ###### Returns

    the state, never `null`