## visad
Interface RealIface

All Superinterfaces:
  Data, ScalarIface, Thing

All Known Implementing Classes:
  Real

public interface RealIface
extends ScalarIface

Interface to scalar data for real numbers represented as double precision floating point values. Double.NaN is used to indicate missing values, because it has the appropriate arithmetic semantics.

Field Summary

Fields inherited from interface visad.Data

`ABS, ACOS, ACOS_DEGREES, ADD, ASIN, ASIN_DEGREES, ATAN, ATAN_DEGREES, ATAN2, ATAN2_DEGREES, CEIL, COS, COS_DEGREES, DEGREES_TO_RADIANS, DEPENDENT, DIVIDE, EXP, FLOOR, INDEPENDENT, INV_ATAN2, INV_ATAN2_DEGREES, INV_DIVIDE, INV_POW, INV_REMAINDER, INV_SUBTRACT, LOG, MAX, MIN, MULTIPLY, NEAREST_NEIGHBOR, NEGATE, NO_ERRORS, NOP, POW, RADIANS_TO_DEGREES, REMAINDER, RINT, ROUND, SIN, SIN_DEGREES, SQRT, SUBTRACT, TAN, TAN_DEGREES, WEIGHTED_AVERAGE`

Method Summary
`Data` `adjustSamplingError(Data error, int error_mode)` Returns a clone, except that the ErrorEstimate of the clone is adjusted for a given error mode and uncertainty.
`Real` `cloneButUnit(Unit u)` Returns a clone of this instance but with a new Unit.
`Real` `cloneButValue(double value)` Returns a clone of this instance with a different numeric value.
`int` `compareTo(Object object)` Compares this Real to another.
`ErrorEstimate` `getError()` Returns the uncertainty in the numeric value of this instance.
`Unit` `getUnit()` Returns the unit of this instance.
`double` `getValue()` Returns the numeric value in the unit of `getUnit()`.
`double` `getValue(Unit unit_out)` Returns the numeric value in a particular unit.
`int` `hashCode()` Returns the hash code of this Real.
`String` `toString()`
`String` `toValueString()` Returns a string that represents just the value portion of this Real -- but with full semantics (e.g.

Methods inherited from interface visad.ScalarIface
`equals`

Methods inherited from interface visad.Data

`abs, abs, acos, acos, acosDegrees, acosDegrees, add, add, asin, asin, asinDegrees, asinDegrees, atan, atan, atan2, atan2, atan2Degrees, atan2Degrees, atanDegrees, atanDegrees, binary, binary, ceil, ceil, changeMathType, computeRanges, computeRanges, computeRanges, cos, cos, cosDegrees, cosDegrees, dataClone, divide, divide, exp, exp, floor, floor, getType, isMissing, local, log, log, longString, longString, max, max, min, min, multiply, multiply, negate, negate, pow, pow, remainder, remainder, rint, rint, round, round, sin, sin, sinDegrees, sinDegrees, sqrt, sqrt, subtract, subtract, tan, tan, tanDegrees, tanDegrees, unary, unary`

Methods inherited from interface visad.Thing
`addReference, removeReference`

Method Detail

### getValue

    public double getValue()

  Returns the numeric value in the unit of `getUnit()`.

  Returns:
    The numeric value in the unit of `getUnit()`.

### getValue

    public double getValue(Unit unit_out)
                    throws VisADException

  Returns the numeric value in a particular unit.

  Returns:
    The numeric value in the given unit.
  Throws:
    `VisADException`

### getUnit

    public Unit getUnit()

  Returns the unit of this instance.

  Returns:
    The unit of this instance.

### getError

    public ErrorEstimate getError()

  Returns the uncertainty in the numeric value of this instance.

  Returns:
    The uncertainty in the numeric value of this instance.

### adjustSamplingError

    public Data adjustSamplingError(Data error,
                                    int error_mode)
                             throws VisADException,
                                    RemoteException

  Returns a clone, except that the ErrorEstimate of the clone is adjusted for a given error mode and uncertainty.

  Specified by:
    `adjustSamplingError` in interface `Data`
  Parameters:
    `error` - The uncertainty by which to adjust the clone.
    `error_mode` - The mode for propagating errors. See `Data`.
  Returns:
    A clone of this instance with a modified uncertainty.
  Throws:
    `VisADException` - VisAD failure.
    `RemoteException` - Java RMI failure.

### cloneButValue

    public Real cloneButValue(double value)
                       throws VisADException

  Returns a clone of this instance with a different numeric value. The unit is unchanged.

  Parameters:
    `value` - The numeric value for the clone.
  Returns:
    A clone of this nstance with the given numeric value.
  Throws:
    `VisADException` - VisAD failure.

### cloneButUnit

    public Real cloneButUnit(Unit u)
                      throws VisADException

  Returns a clone of this instance but with a new Unit. The numeric value is unchanged.

  Parameters:
    `u` - The unit for the clone.
  Returns:
    A clone of this instance but with the given unit.
  Throws:
    `VisADException`

### toString

    public String toString()

### toValueString

    public String toValueString()

  Returns a string that represents just the value portion of this Real -- but with full semantics (e.g. numeric value and unit).

  Returns:
    A string representation of just the value portion of this Real.

### compareTo

    public int compareTo(Object object)

  Compares this Real to another.

  Parameters:
    `object` - The other Real to compare against. It shall be a Real with a compatible (i.e. convertible) unit.
  Returns:
    A negative integer, zero, or a positive integer depending on whether this Real is considered less than, equal to, or greater than the other Real, respectively. If the values of the Real-s in the default unit are equal, then the `ErrorEstimate.compareTo()` method is used to break the tie.

### hashCode

    public int hashCode()

  Returns the hash code of this Real.

  Returns:
    The hash code of this Real. If two Real-s are semantically identical, then their hash codes are equal.