public interface INumber
This interface represents every possible primitive number. Because the concrete instance will hold a concrete value there exists two possible conversion for its type:
The following tables gives a description on converting numbers. The letters have the following meanings:
Converted from | Converted to | ||||||
---|---|---|---|---|---|---|---|
boolean | byte | short | integer | long | float | double | |
boolean | / | Y | Y | Y | Y | Y | Y |
byte | C | / | Y | Y | Y | Y | Y |
short | C | C | / | Y | Y | Y | Y |
integer | C | C | C | / | Y | Y* | Y |
long | C | C | C | C | / | Y* | Y* |
float | C | C | C | C | C | / | Y |
double | C | C | C | C | C | C | / |
Modifier and Type | Method and Description |
---|---|
boolean |
booleanValue()
Returns the boolean value of the corresponding number.
|
byte |
byteValue()
Returns the byte value of the corresponding number.
|
double |
doubleValue()
Returns the double value of the corresponding number.
|
float |
floatValue()
Returns the float value of the corresponding number.
|
int |
intValue()
Returns the integer value of the corresponding number.
|
long |
longValue()
Returns the long value of the corresponding number.
|
void |
setValue(boolean bool_)
This will set the current value to the assigned boolean one.
|
void |
setValue(byte byte_)
This will set the current value to the assigned byte one.
|
void |
setValue(double double_)
This will set the current value to the assigned double one.
|
void |
setValue(float float_)
This will set the current value to the assigned float one.
|
void |
setValue(int int_)
This will set the current value to the assigned integer one.
|
void |
setValue(long long_)
This will set the current value to the assigned long one.
|
void |
setValue(short short_)
This will set the current value to the assigned short one.
|
short |
shortValue()
Returns the short value of the corresponding number.
|
boolean booleanValue()
byte byteValue()
short shortValue()
int intValue()
long longValue()
float floatValue()
double doubleValue()
void setValue(boolean bool_)
bool_
- The boolean value.void setValue(byte byte_)
byte_
- The byte value.void setValue(short short_)
short_
- The short value.void setValue(int int_)
int_
- The integer value.void setValue(long long_)
long_
- The long value.void setValue(float float_)
float_
- The float value.void setValue(double double_)
double_
- The double value.14-September-2016 18:23 Deutsches Elektronen-Synchrotron DESY in der Helmholtz-Gemeinschaft