Class EnumDoubles<E extends Enum<E>>

java.lang.Object
org.apache.hadoop.hdfs.util.EnumDoubles<E>
Type Parameters:
E - the enum type

public class EnumDoubles<E extends Enum<E>> extends Object
Similar to EnumCounters except that the value type is double.
  • Constructor Summary

    Constructors
    Constructor
    Description
    EnumDoubles(Class<E> enumClass)
    Construct doubles for the given enum constants.
  • Method Summary

    Modifier and Type
    Method
    Description
    final void
    add(E e, double value)
    Add the given value to e.
    final void
    add(EnumDoubles<E> that)
    Add the values of that object to this.
    boolean
     
    final double
    get(E e)
     
    int
     
    final void
    Negate all values.
    final void
    Reset all values to zero.
    final void
    set(E e, double value)
    Set e to the given value.
    final void
    set(EnumDoubles<E> that)
    Set the values of this object to that object.
    final void
    subtract(E e, double value)
    Subtract the given value from e.
    final void
    Subtract the values of this object from that object.
     

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • EnumDoubles

      public EnumDoubles(Class<E> enumClass)
      Construct doubles for the given enum constants.
      Parameters:
      enumClass - the enum class.
  • Method Details

    • get

      public final double get(E e)
      Returns:
      the value corresponding to e.
    • negation

      public final void negation()
      Negate all values.
    • set

      public final void set(E e, double value)
      Set e to the given value.
    • set

      public final void set(EnumDoubles<E> that)
      Set the values of this object to that object.
    • reset

      public final void reset()
      Reset all values to zero.
    • add

      public final void add(E e, double value)
      Add the given value to e.
    • add

      public final void add(EnumDoubles<E> that)
      Add the values of that object to this.
    • subtract

      public final void subtract(E e, double value)
      Subtract the given value from e.
    • subtract

      public final void subtract(EnumDoubles<E> that)
      Subtract the values of this object from that object.
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object