FixedPointDecimal
Inheritance: java.lang.Object
public class FixedPointDecimal
Fixed-point decimal, with 16-bit integer and 16-bit fraction.
Constructors
Constructor | Description |
---|---|
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
Method | Description |
---|---|
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:
Parameter | Type | Description |
---|---|---|
integer | int | The integer. |
fraction | int | The 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:
Parameter | Type | Description |
---|---|---|
value | long | The value. |
FixedPointDecimal(double value)
public FixedPointDecimal(double value)
Initializes a new instance of the FixedPointDecimal class.
Parameters:
Parameter | Type | Description |
---|---|---|
value | double | The value. |
equals(Object arg0)
public boolean equals(Object arg0)
Parameters:
Parameter | Type | Description |
---|---|---|
arg0 | java.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:
Parameter | Type | Description |
---|---|---|
value | int |
setInteger(int value)
public final void setInteger(int value)
Gets or sets the integer.
Value: The integer.
Parameters:
Parameter | Type | Description |
---|---|---|
value | int |
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:
Parameter | Type | Description |
---|---|---|
arg0 | long |
wait(long arg0, int arg1)
public final void wait(long arg0, int arg1)
Parameters:
Parameter | Type | Description |
---|---|---|
arg0 | long | |
arg1 | int |