Package org.apache.hadoop.fs.s3a

Enum Class Tristate

java.lang.Object
java.lang.Enum<Tristate>
org.apache.hadoop.fs.s3a.Tristate
All Implemented Interfaces:
Serializable, Comparable<Tristate>, Constable

public enum Tristate extends Enum<Tristate>
Simple enum to express {true, false, don't know}.
  • Enum Constant Details

    • TRUE

      public static final Tristate TRUE
    • FALSE

      public static final Tristate FALSE
    • UNKNOWN

      public static final Tristate UNKNOWN
  • Method Details

    • values

      public static Tristate[] 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 Tristate 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
    • getMapping

      public Optional<Boolean> getMapping()
      Get the boolean mapping, if present.
      Returns:
      the boolean value, if present.
    • isBoolean

      public boolean isBoolean()
      Does this value map to a boolean.
      Returns:
      true if the state is one of true or false.
    • fromBool

      public static Tristate fromBool(boolean v)
    • from

      public static Tristate from(Optional<Boolean> b)
      Build a tristate from a boolean.
      Parameters:
      b - source optional
      Returns:
      a tristate derived from the argument.