FixedPointDecimal

Inheritance: java.lang.Object

public class FixedPointDecimal

Fixed-point decimal, with 16-bit integer and 16-bit fraction.

Constructors

ConstructorDescription
FixedPointDecimal(int integer, int fraction)Initializes a new instance of the FixedPointDecimal class.
FixedPointDecimal(long value)Initializes a new instance of the FixedPointDecimal class.
FixedPointDecimal(double value)Initializes a new instance of the FixedPointDecimal class.

Methods

MethodDescription
equals(Object arg0)
getClass()
getFraction()Gets or sets the fraction.
getInteger()Gets or sets the integer.
hashCode()
notify()
notifyAll()
setFraction(int value)Gets or sets the fraction.
setInteger(int value)Gets or sets the integer.
toDouble()Converts current fixed point decimal to double.
toString()
wait()
wait(long arg0)
wait(long arg0, int arg1)

FixedPointDecimal(int integer, int fraction)

public FixedPointDecimal(int integer, int fraction)

Initializes a new instance of the FixedPointDecimal class.

Parameters:

ParameterTypeDescription
integerintThe integer.
fractionintThe fraction.

FixedPointDecimal(long value)

public FixedPointDecimal(long value)

Initializes a new instance of the FixedPointDecimal class. Split the high and low words of a 32-bit integer into a fixed-point number.

Parameters:

ParameterTypeDescription
valuelongThe value.

FixedPointDecimal(double value)

public FixedPointDecimal(double value)

Initializes a new instance of the FixedPointDecimal class.

Parameters:

ParameterTypeDescription
valuedoubleThe value.

equals(Object arg0)

public boolean equals(Object arg0)

Parameters:

ParameterTypeDescription
arg0java.lang.Object

Returns: boolean

getClass()

public final native Class<?> getClass()

Returns: java.lang.Class

getFraction()

public final int getFraction()

Gets or sets the fraction.

Value: The fraction.

Returns: int

getInteger()

public final int getInteger()

Gets or sets the integer.

Value: The integer.

Returns: int

hashCode()

public native int hashCode()

Returns: int

notify()

public final native void notify()

notifyAll()

public final native void notifyAll()

setFraction(int value)

public final void setFraction(int value)

Gets or sets the fraction.

Value: The fraction.

Parameters:

ParameterTypeDescription
valueint

setInteger(int value)

public final void setInteger(int value)

Gets or sets the integer.

Value: The integer.

Parameters:

ParameterTypeDescription
valueint

toDouble()

public final double toDouble()

Converts current fixed point decimal to double.

Returns: double - The converted value.

toString()

public String toString()

Returns: java.lang.String

wait()

public final void wait()

wait(long arg0)

public final void wait(long arg0)

Parameters:

ParameterTypeDescription
arg0long

wait(long arg0, int arg1)

public final void wait(long arg0, int arg1)

Parameters:

ParameterTypeDescription
arg0long
arg1int