com.qualcomm.robotcore.hardware

## Enum DcMotor.ZeroPowerBehavior

- java.lang.Object
- - java.lang.Enum<DcMotor.ZeroPowerBehavior>
  - - com.qualcomm.robotcore.hardware.DcMotor.ZeroPowerBehavior

- All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<DcMotor.ZeroPowerBehavior>
  Enclosing interface:
    DcMotor

      public static enum DcMotor.ZeroPowerBehavior
      extends java.lang.Enum<DcMotor.ZeroPowerBehavior>

  ZeroPowerBehavior provides an indication as to a motor's behavior when a power level of zero is applied.
  See Also:
    `DcMotor.setZeroPowerBehavior(ZeroPowerBehavior)`, `DcMotorSimple.setPower(double)`

- - ### Enum Constant Summary

    Enum Constants
    Enum Constant and Description
    `BRAKE` The motor stops and then brakes, actively resisting any external force which attempts to turn the motor.
    `FLOAT` The motor stops and then floats: an external force attempting to turn the motor is not met with active resistence.
    `UNKNOWN` The behavior of the motor when zero power is applied is not currently known.

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static DcMotor.ZeroPowerBehavior` | `valueOf(java.lang.String name)` Returns the enum constant of this type with the specified name.
    `static DcMotor.ZeroPowerBehavior[]` | `values()` Returns an array containing the constants of this enum type, in the order they are declared.

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

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

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

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

- - ### Enum Constant Detail

    - #### UNKNOWN

          public static final DcMotor.ZeroPowerBehavior UNKNOWN

      The behavior of the motor when zero power is applied is not currently known. This value is mostly useful for your internal state variables. It may not be passed as a parameter to `DcMotor.setZeroPowerBehavior(ZeroPowerBehavior)` and will never be returned from `DcMotor.getZeroPowerBehavior()`

    - #### BRAKE

          public static final DcMotor.ZeroPowerBehavior BRAKE

      The motor stops and then brakes, actively resisting any external force which attempts to turn the motor.

    - #### FLOAT

          public static final DcMotor.ZeroPowerBehavior FLOAT

      The motor stops and then floats: an external force attempting to turn the motor is not met with active resistence.

  - ### Method Detail

    - #### values

          public static DcMotor.ZeroPowerBehavior[] values()

      Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:

          for (DcMotor.ZeroPowerBehavior c : DcMotor.ZeroPowerBehavior.values())
              System.out.println(c);

      Returns:
        an array containing the constants of this enum type, in the order they are declared

    - #### valueOf

          public static DcMotor.ZeroPowerBehavior valueOf(java.lang.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:
        `java.lang.IllegalArgumentException` - if this enum type has no constant with the specified name
        `java.lang.NullPointerException` - if the argument is null