Package org.apache.hadoop.hdfs.util
Class EnumDoubles<E extends Enum<E>>
java.lang.Object
org.apache.hadoop.hdfs.util.EnumDoubles<E>
- Type Parameters:
E- the enum type
Similar to
EnumCounters except that the value type is double.-
Constructor Summary
ConstructorsConstructorDescriptionEnumDoubles(Class<E> enumClass) Construct doubles for the given enum constants. -
Method Summary
Modifier and TypeMethodDescriptionfinal voidAdd the given value to e.final voidadd(EnumDoubles<E> that) Add the values of that object to this.booleanfinal doubleinthashCode()final voidnegation()Negate all values.final voidreset()Reset all values to zero.final voidSet e to the given value.final voidset(EnumDoubles<E> that) Set the values of this object to that object.final voidSubtract the given value from e.final voidsubtract(EnumDoubles<E> that) Subtract the values of this object from that object.toString()
-
Constructor Details
-
EnumDoubles
Construct doubles for the given enum constants.- Parameters:
enumClass- the enum class.
-
-
Method Details
-
get
- Returns:
- the value corresponding to e.
-
negation
public final void negation()Negate all values. -
set
Set e to the given value. -
set
Set the values of this object to that object. -
reset
public final void reset()Reset all values to zero. -
add
Add the given value to e. -
add
Add the values of that object to this. -
subtract
Subtract the given value from e. -
subtract
Subtract the values of this object from that object. -
equals
-
hashCode
public int hashCode() -
toString
-