|
MXQuery 0.6.0 API Documentation - Copyright 2006-2009 ETH Zurich | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectch.ethz.mxquery.util.IntDouble
public class IntDouble
Double implementation on an integer.
NaN, Inf, and Exponential representation (e.g. 2e-4) are not supported
Field Summary | |
---|---|
static int |
maxDecimalPlaces
|
Constructor Summary | |
---|---|
IntDouble(int decimalPlaces)
Constructor |
|
IntDouble(int init,
int decimalPlaces)
Constructor |
|
IntDouble(java.lang.String str,
int decimalPlaces)
Constructor |
Method Summary | |
---|---|
IntDouble |
add(int i)
|
IntDouble |
add(IntDouble id)
|
static java.lang.String |
addStartZerosToComma(java.lang.String str,
int commaLength)
Fills the str with commas at the begining till str.length() == commaLength . |
int |
compareTo(int i)
|
int |
compareTo(IntDouble id)
|
static int |
countStartZeros(java.lang.String str)
Counts the prefix zeros. |
static java.lang.String |
deleteEndZeros(java.lang.String str)
Deletes all zeros at the end of str. |
IntDouble |
divide(int i)
|
IntDouble |
divide(IntDouble id)
|
boolean |
equals(IntDouble id)
|
boolean |
equals(java.lang.Object o)
|
boolean |
equalsZero()
|
int |
getIntValue()
|
static int |
getLastDigit(int value)
Returns the last digit of the passed value. |
int |
hashCode()
|
int |
idiv(int i)
|
int |
idiv(IntDouble id)
|
IntDouble |
mod(int i)
|
IntDouble |
mod(IntDouble id)
|
IntDouble |
multiply(int i)
|
IntDouble |
multiply(IntDouble id)
|
IntDouble |
negate()
|
IntDouble |
subtract(int i)
|
IntDouble |
subtract(IntDouble id)
|
java.lang.String |
toString()
|
boolean |
unequals(IntDouble id)
|
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int maxDecimalPlaces
Constructor Detail |
---|
public IntDouble(int decimalPlaces)
decimalPlaces
- public IntDouble(java.lang.String str, int decimalPlaces)
str
- tries to parse this stringdecimalPlaces
- public IntDouble(int init, int decimalPlaces)
init
- initial value (only integer)decimalPlaces
- Method Detail |
---|
public static java.lang.String addStartZerosToComma(java.lang.String str, int commaLength)
str.length() == commaLength
.
str
- commaLength
-
public static java.lang.String deleteEndZeros(java.lang.String str)
str
-
public static int countStartZeros(java.lang.String str)
str
-
public static int getLastDigit(int value)
value
-
public boolean equalsZero()
public IntDouble add(IntDouble id)
public IntDouble add(int i)
public IntDouble subtract(IntDouble id)
public IntDouble subtract(int i)
public IntDouble multiply(IntDouble id)
public IntDouble multiply(int i)
public IntDouble divide(IntDouble id) throws MXQueryException
MXQueryException
public IntDouble divide(int i)
public IntDouble mod(IntDouble id)
public IntDouble mod(int i)
public int idiv(IntDouble id) throws MXQueryException
MXQueryException
public int idiv(int i)
public IntDouble negate()
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public boolean equals(IntDouble id)
public boolean unequals(IntDouble id)
public int compareTo(IntDouble id)
public int compareTo(int i)
public int getIntValue()
public java.lang.String toString()
toString
in class java.lang.Object
|
MXQuery 0.6.0 API Documentation - Copyright 2006-2009 ETH Zurich | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |