|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.extex.interpreter.primitives.register.real.Real
public class Real
Real (with a double value).
| Field Summary | |
|---|---|
static Real |
MAX_VALUE
max-Real |
static Real |
ZERO
ZERO-Real |
| Constructor Summary | |
|---|---|
Real(Context context,
TokenSource source,
Typesetter typesetter)
Creates a new object. |
|
Real(double val)
Creates a new object. |
|
Real(float val)
Creates a new object. |
|
Real(int i)
Creates a new object. |
|
Real(long l)
Creates a new object. |
|
Real(Real val)
Creates a new object. |
|
Real(java.lang.String s)
Creates a new object. |
|
| Method Summary | |
|---|---|
void |
add(double val)
add |
void |
add(Real real)
add |
void |
divide(double val)
divide |
void |
divide(Real val)
divide |
long |
getLong()
Return the value as long. |
double |
getValue()
Getter for the value |
void |
multiply(double val)
multiply |
void |
multiply(Real val)
multiply |
void |
setValue(double d)
Setter for the value. |
java.lang.String |
toString()
Return the value as String |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final Real ZERO
public static final Real MAX_VALUE
| Constructor Detail |
|---|
public Real(Context context,
TokenSource source,
Typesetter typesetter)
throws HelpingException,
ConfigurationException,
TypesetterException
TokenSource for a Real.
context - the interpreter contextsource - the token sourcetypesetter - the typesetter
HelpingException - in case of an error
ConfigurationException - in case of an configuration error
TypesetterException - in case of an error in the typesetterpublic Real(double val)
val - initialize with double valuepublic Real(float val)
val - the value as floatpublic Real(int i)
i - the value as intpublic Real(long l)
l - the value as longpublic Real(Real val)
val - the value
public Real(java.lang.String s)
throws HelpingException
If the string equals null or empty, the value is set to
zero
s - the value as String
HelpingException - if a NumberFormatException is throws| Method Detail |
|---|
public void add(double val)
val - the value to addpublic void add(Real real)
real - the value to add
public void divide(double val)
throws HelpingException
val - the value to divide
HelpingException - in case of a division by zero
public void divide(Real val)
throws HelpingException
val - the value to divide
HelpingException - in case of a division by zeropublic long getLong()
public double getValue()
public void multiply(double val)
val - the value to multiplypublic void multiply(Real val)
val - the value to multiplypublic void setValue(double d)
d - the new valuepublic java.lang.String toString()
String
toString in class java.lang.ObjectString
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||