Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## edu.stanford.nlp.util
Class MutableDouble

    java.lang.Object
      java.lang.Number
          edu.stanford.nlp.util.MutableDouble

All Implemented Interfaces:
  Serializable, Comparable<MutableDouble>

    public final class MutableDouble

extends Number
implements Comparable<MutableDouble>

A class for Double objects that you can change.

Author:
  Dan Klein
See Also:
  Serialized Form

Constructor Summary
`MutableDouble()`
`MutableDouble(double d)`
`MutableDouble(Number num)`

Method Summary
`byte` | `byteValue()`
`int` | `compareTo(MutableDouble anotherMutableDouble)` Compares two `MutableDouble` objects numerically.
`double` | `doubleValue()`
`boolean` | `equals(Object obj)` Compares this object to the specified object.
`float` | `floatValue()`
`int` | `hashCode()`
`int` | `intValue()`
`long` | `longValue()`
`void` | `set(double d)`
`short` | `shortValue()`
`String` | `toString()`

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

Constructor Detail

### MutableDouble

    public MutableDouble()

### MutableDouble

    public MutableDouble(double d)

### MutableDouble

    public MutableDouble(Number num)

Method Detail

### set

    public void set(double d)

### hashCode

    public int hashCode()

  Overrides:
    `hashCode` in class `Object`

### equals

    public boolean equals(Object obj)

  Compares this object to the specified object. The result is `true` if and only if the argument is not `null` and is an `MutableDouble` object that contains the same `double` value as this object. Note that a MutableDouble isn't and can't be equal to an Double.

  Overrides:
    `equals` in class `Object`
  Parameters:
    `obj` - the object to compare with.
  Returns:
    `true` if the objects are the same; `false` otherwise.

### toString

    public String toString()

  Overrides:
    `toString` in class `Object`

### compareTo

    public int compareTo(MutableDouble anotherMutableDouble)

  Compares two `MutableDouble` objects numerically.

  Specified by:
    `compareTo` in interface `Comparable<MutableDouble>`
  Parameters:
    `anotherMutableDouble` - the `MutableDouble` to be compared.
  Returns:
    Tthe value `0` if this `MutableDouble` is equal to the argument `MutableDouble`; a value less than `0` if this `MutableDouble` is numerically less than the argument `MutableDouble`; and a value greater than `0` if this `MutableDouble` is numerically greater than the argument `MutableDouble` (signed comparison).

### intValue

    public int intValue()

  Specified by:
    `intValue` in class `Number`

### longValue

    public long longValue()

  Specified by:
    `longValue` in class `Number`

### shortValue

    public short shortValue()

  Overrides:
    `shortValue` in class `Number`

### byteValue

    public byte byteValue()

  Overrides:
    `byteValue` in class `Number`

### floatValue

    public float floatValue()

  Specified by:
    `floatValue` in class `Number`

### doubleValue

    public double doubleValue()

  Specified by:
    `doubleValue` in class `Number`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Stanford NLP Group