Skip navigation links

Oracle® Coherence Java API Reference
Release 3.6.1.0

E18814-01


com.tangosol.io.pof
Class RawQuad

java.lang.Object
  extended by java.lang.Number
      extended by com.tangosol.io.pof.RawQuad

All Implemented Interfaces:
java.io.Serializable

public class RawQuad
extends java.lang.Number

An immutable POF 128-bit float.

Since:
Coherence 3.2
Author:
cp 2006.07.17

Field Summary
static RawQuad ZERO
          An empty RawQuad value.

 

Constructor Summary
RawQuad(java.math.BigInteger nUnscaledValue, int nScale)
          Construct a RawQuad from an unscaled integer value and a scale.
RawQuad(Binary binBits)
          Construct a RawQuad from the raw binary data.
RawQuad(double dfl)
          Construct a RawQuad from a double.

 

Method Summary
 double doubleValue()
          Returns the value of the specified number as a double.
 boolean equals(java.lang.Object o)
          Compare this object with another for equality.
 float floatValue()
          Returns the value of the specified number as a float.
 Binary getBits()
          Obtain the raw binary form of the 128-bit float.
 int hashCode()
          Obtain the hashcode for this object.
 int intValue()
          Returns the value of the specified number as an int.
 long longValue()
          Returns the value of the specified number as a long.
 int scale()
          Get the base-2 scale (exponent) of the quad value.
 java.lang.String toString()
          Format this object's data as a human-readable string.
 java.math.BigInteger unscaledValue()
          Get the base-2 unscaled value (mantissa) of the quad value.

 

Methods inherited from class java.lang.Number
byteValue, shortValue

 

Field Detail

ZERO

public static final RawQuad ZERO
An empty RawQuad value.

Constructor Detail

RawQuad

public RawQuad(Binary binBits)
Construct a RawQuad from the raw binary data.
Parameters:
binBits - the raw binary form of the 128-bit float

RawQuad

public RawQuad(double dfl)
Construct a RawQuad from a double.
Parameters:
dfl - the double value

RawQuad

public RawQuad(java.math.BigInteger nUnscaledValue,
               int nScale)
Construct a RawQuad from an unscaled integer value and a scale.
Parameters:
nUnscaledValue - the unscaled value (mantissa)
nScale - the scale (exponent)

Method Detail

intValue

public int intValue()
Returns the value of the specified number as an int. This may involve rounding or truncation.
Specified by:
intValue in class java.lang.Number
Returns:
the numeric value represented by this object after conversion to type int.

longValue

public long longValue()
Returns the value of the specified number as a long. This may involve rounding or truncation.
Specified by:
longValue in class java.lang.Number
Returns:
the numeric value represented by this object after conversion to type long.

floatValue

public float floatValue()
Returns the value of the specified number as a float. This may involve rounding.
Specified by:
floatValue in class java.lang.Number
Returns:
the numeric value represented by this object after conversion to type float.

doubleValue

public double doubleValue()
Returns the value of the specified number as a double. This may involve rounding.
Specified by:
doubleValue in class java.lang.Number
Returns:
the numeric value represented by this object after conversion to type double.

getBits

public Binary getBits()
Obtain the raw binary form of the 128-bit float.
Returns:
a 16-byte binary

unscaledValue

public java.math.BigInteger unscaledValue()
Get the base-2 unscaled value (mantissa) of the quad value.

The name of this method is based on Java's BigDecimal.

Returns:
an unscaled binary integer value of up to 113 binary digits

scale

public int scale()
Get the base-2 scale (exponent) of the quad value.

The name of this method is based on Java's BigDecimal.

Returns:
a binary exponent between -16382 to 16383 inclusive

equals

public boolean equals(java.lang.Object o)
Compare this object with another for equality.
Parameters:
o - another object to compare to for equality
Returns:
true iff this object is equal to the other object

hashCode

public int hashCode()
Obtain the hashcode for this object.
Returns:
an integer hashcode

toString

public java.lang.String toString()
Format this object's data as a human-readable string.
Returns:
a string description of this object

Skip navigation links

Oracle® Coherence Java API Reference
Release 3.6.1.0

E18814-01


Copyright © 2000, 2010, Oracle and/or its affiliates. All rights reserved.