public interface IBasicValue
| Modifier and Type | Method and Description |
|---|---|
boolean |
getBoolean()
Gets the value of this line as a boolean.
If this line is not a boolean, this will return false. |
boolean |
getBoolean(boolean def)
Gets the value of this line as a boolean.
If this line is not a boolean, this will return def. |
byte |
getByte()
Gets the value of this line as a byte.
If this line is not a byte, this will return 0. |
byte |
getByte(byte def)
Gets the value of this line as a byte.
If this line is not a byte, this will return def. |
char |
getChar()
Gets the value of this line as a char.
If this line is not a char, this will return ' ' (null character). |
char |
getChar(char def)
Gets the value of this line as a char.
If this line is not a char, this will return def. |
double |
getDouble()
Gets the value of this line as a double.
If this line is not a double, this will return 0. |
double |
getDouble(double def)
Gets the value of this line as a double.
If this line is not a double, this will return def. |
float |
getFloat()
Gets the value of this line as a float.
If this line is not a float, this will return 0. |
float |
getFloat(float def)
Gets the value of this line as a float.
If this line is not a float, this will return def. |
int |
getInt()
Gets the value of this line as an int.
If this line is not an int, this will return 0. |
int |
getInt(int def)
Gets the value of this line as a int.
If this line is not a int, this will return def. |
long |
getLong()
Gets the value of this line as a long.
If this line is not a long, this will return 0. |
long |
getLong(long def)
Gets the value of this line as a long.
If this line is not a long, this will return def. |
Object |
getObject()
Gets the value of this line and converts it to the most applicable type.
|
short |
getShort()
Gets the value of this line as a short.
If this line is not a short, this will return 0. |
short |
getShort(short def)
Gets the value of this line as a short.
If this line is not a short, this will return def. |
String |
getString()
Gets the value of this line as a String.
|
<T> T |
getT(Class<T> clazz)
Gets the value of this line as an instance of the given class.
If this line is not an instance of the given class, this will return null. |
<T> T |
getT(T def,
Class<T> clazz)
Gets the value of this line as an instance of the given class.
If this line is not an instance of the given class, this will return def. |
boolean |
isBoolean() |
boolean |
isByte() |
boolean |
isChar() |
boolean |
isDouble() |
boolean |
isFloat() |
boolean |
isInt() |
boolean |
isLong() |
boolean |
isShort() |
boolean |
isString() |
<T> boolean |
isT(Class<T> clazz) |
byte getByte()
byte getByte(byte def)
def - - The byte that will be returned if the value is not a byte.boolean isByte()
short getShort()
short getShort(short def)
def - - The short that will be returned if the value is not a short.boolean isShort()
int getInt()
int getInt(int def)
def - - The int that will be returned if the value is not a int.boolean isInt()
long getLong()
long getLong(long def)
def - - The long that will be returned if the value is not a long.boolean isLong()
float getFloat()
float getFloat(float def)
def - - The float that will be returned if the value is not a float.boolean isFloat()
double getDouble()
double getDouble(double def)
def - - The double that will be returned if the value is not a double.boolean isDouble()
boolean getBoolean()
boolean getBoolean(boolean def)
def - - The boolean that will be returned if the value is not a boolean.boolean isBoolean()
char getChar()
char getChar(char def)
def - - The char that will be returned if the value is not a char.boolean isChar()
String getString()
boolean isString()
Object getObject()
<T> T getT(Class<T> clazz)
clazz - - The class of the type to get.<T> T getT(T def,
Class<T> clazz)
def - - The object that will be returned if the value is not an instance of the given class.clazz - - The class of the type to get.<T> boolean isT(Class<T> clazz)
Copyright © 2014. All rights reserved.