public interface IBasicSection
| Modifier and Type | Method and Description |
|---|---|
boolean |
getBoolean(String path)
Gets the requested boolean by path.
If the value at the path does not exist or is not a boolean, this will return false. |
boolean |
getBoolean(String path,
boolean def)
Gets the requested boolean by path.
If the value at the path does not exist or is not a boolean, this will return def. |
List<Boolean> |
getBooleanList(String path)
Gets the requested List of Boolean by path.
If the value at the path does not exist or is not a List of Booleans, this will return an empty list. |
byte |
getByte(String path)
Gets the requested byte by path.
If the value at the path does not exist or is not a byte, this will return 0. |
byte |
getByte(String path,
byte def)
Gets the requested byte by path.
If the value at the path does not exist or is not a byte, this will return def. |
List<Byte> |
getByteList(String path)
Gets the requested List of Byte by path.
If the value at the path does not exist or is not a List of Bytes, this will return an empty list. |
char |
getChar(String path)
Gets the requested char by path.
If the value at the path does not exist or is not a char, this will return ' ' (null char). |
char |
getChar(String path,
char def)
Gets the requested char by path.
If the value at the path does not exist or is not a char, this will return def. |
List<Character> |
getCharacterList(String path)
Gets the requested List of Character by path.
If the value at the path does not exist or is not a List of Characters, this will return an empty list. |
double |
getDouble(String path)
Gets the requested double by path.
If the value at the path does not exist or is not a double, this will return 0. |
double |
getDouble(String path,
double def)
Gets the requested double by path.
If the value at the path does not exist or is not a double, this will return def. |
List<Double> |
getDoubleList(String path)
Gets the requested List of Double by path.
If the value at the path does not exist or is not a List of Doubles, this will return an empty list. |
float |
getFloat(String path)
Gets the requested float by path.
If the value at the path does not exist or is not a float, this will return 0. |
float |
getFloat(String path,
float def)
Gets the requested float by path.
If the value at the path does not exist or is not a float, this will return def. |
List<Float> |
getFloatList(String path)
Gets the requested List of Float by path.
If the value at the path does not exist or is not a List of Floats, this will return an empty list. |
int |
getInt(String path)
Gets the requested int by path.
If the value at the path does not exist or is not a int, this will return 0. |
int |
getInt(String path,
int def)
Gets the requested int by path.
If the value at the path does not exist or is not a int, this will return def. |
List<Integer> |
getIntegerList(String path)
Gets the requested List of Integer by path.
If the value at the path does not exist or is not a List of Integers, this will return an empty list. |
long |
getLong(String path)
Gets the requested long by path.
If the value at the path does not exist or is not a long, this will return 0. |
long |
getLong(String path,
long def)
Gets the requested long by path.
If the value at the path does not exist or is not a long, this will return def. |
List<Long> |
getLongList(String path)
Gets the requested List of Long by path.
If the value at the path does not exist or is not a List of Longs, this will return an empty list. |
List<Object> |
getMixedList(String path)
Gets the requested List by path.
If the value at the path does not exist, this will return an empty list. Converts whole numbers into Integers or Longs (whichever fits best) Converts floating point numbers into Doubles Converts true, false, yes and no into their respective Boolean values |
Object |
getObject(String path) |
Object |
getObject(String path,
Object def) |
short |
getShort(String path)
Gets the requested short by path.
If the value at the path does not exist or is not a short, this will return 0. |
short |
getShort(String path,
short def)
Gets the requested short by path.
If the value at the path does not exist or is not a short, this will return def. |
List<Short> |
getShortList(String path)
Gets the requested List of Short by path.
If the value at the path does not exist or is not a List of Shorts, this will return an empty list. |
String |
getString(String path)
Gets the requested String by path.
If the value at the path does not exist, this will return null. |
String |
getString(String path,
String def)
Gets the requested String by path.
If the value at the path does not exist, this will return def. |
List<String> |
getStringList(String path)
Gets the requested List of String by path.
If the value at the path does not exist, this will return an empty list. |
<T> T |
getT(String path,
Class<T> clazz)
Gets an instance of the given class by path.
If the value at the path does not exist or is not an instance of the given class, this will return null. |
<T> T |
getT(String path,
T def,
Class<T> clazz)
Gets an instance of the given class by path.
If the value at the path does not exist or is not an instance of the given class, this will return def. |
<T> List<T> |
getTList(String path,
Class<T> clazz)
Gets the requested List by path.
If the value at the path does not exist or is not a List of T, this will return an empty list. |
boolean |
isBoolean(String path)
Checks if the entry at the given path can be interpreted as a boolean.
|
boolean |
isByte(String path)
Checks if the entry at the given path can be interpreted as a byte.
|
boolean |
isChar(String path)
Checks if the entry at the given path can be interpreted as a char.
|
boolean |
isDouble(String path)
Checks if the entry at the given path can be interpreted as a double.
|
boolean |
isFloat(String path)
Checks if the entry at the given path can be interpreted as a float.
|
boolean |
isInt(String path)
Checks if the entry at the given path can be interpreted as an int.
|
boolean |
isLong(String path)
Checks if the entry at the given path can be interpreted as a long.
|
boolean |
isShort(String path)
Checks if the entry at the given path can be interpreted as a short.
|
boolean |
isString(String path)
Checks if the entry at the given path can be interpreted as a String.
|
<T> boolean |
isT(String path,
Class<T> clazz)
Checks if the entry at the given path can be interpreted as an instance of the given class.
|
byte getByte(String path)
path - - Path of the byte to get.byte getByte(String path, byte def)
path - - Path of the byte to get.def - - The byte that will be returned if the value does not exist or is not a byte.boolean isByte(String path)
path - - Path of the entry to check.short getShort(String path)
path - - Path of the short to get.short getShort(String path, short def)
path - - Path of the short to get.def - - The short that will be returned if the value does not exist or is not a short.boolean isShort(String path)
path - - Path of the entry to check.int getInt(String path)
path - - Path of the int to get.int getInt(String path, int def)
path - - Path of the int to get.def - - The int that will be returned if the value does not exist or is not a int.boolean isInt(String path)
path - - Path of the entry to check.long getLong(String path)
path - - Path of the long to get.long getLong(String path, long def)
path - - Path of the long to get.def - - The long that will be returned if the value does not exist or is not a long.boolean isLong(String path)
path - - Path of the entry to check.float getFloat(String path)
path - - Path of the float to get.float getFloat(String path, float def)
path - - Path of the float to get.def - - The float that will be returned if the value does not exist or is not a float.boolean isFloat(String path)
path - - Path of the entry to check.double getDouble(String path)
path - - Path of the double to get.double getDouble(String path, double def)
path - - Path of the double to get.def - - The double that will be returned if the value does not exist or is not a double.boolean isDouble(String path)
path - - Path of the entry to check.boolean getBoolean(String path)
path - - Path of the boolean to get.boolean getBoolean(String path, boolean def)
path - - Path of the boolean to get.def - - The boolean that will be returned if the value does not exist or is not a boolean.boolean isBoolean(String path)
path - - Path of the entry to check.char getChar(String path)
path - - Path of the char to get.char getChar(String path, char def)
path - - Path of the char to get.def - - The char that will be returned if the value does not exist or is not a char.boolean isChar(String path)
path - - Path of the entry to check.String getString(String path)
path - - Path of the String to get.String getString(String path, String def)
path - - Path of the String to get.def - - The String that will be returned if the value does not exist.boolean isString(String path)
path - - Path of the entry to check.<T> T getT(String path, Class<T> clazz)
path - - Path of the entry to get.clazz - - The class of the type you want to get.<T> T getT(String path, T def, Class<T> clazz)
path - - Path of the entry to get.def - - The value that will be returned if the value does not exist or is not an instance of the given class.clazz - - The class of the type you want to get.<T> boolean isT(String path, Class<T> clazz)
path - - Path of the entry to check.clazz - - The class of the type you want to check.List<Byte> getByteList(String path)
path - - Path of the List to get.List<Short> getShortList(String path)
path - - Path of the List to get.List<Integer> getIntegerList(String path)
path - - Path of the List to get.List<Long> getLongList(String path)
path - - Path of the List to get.List<Float> getFloatList(String path)
path - - Path of the List to get.List<Double> getDoubleList(String path)
path - - Path of the List to get.List<Boolean> getBooleanList(String path)
path - - Path of the List to get.List<Character> getCharacterList(String path)
path - - Path of the List to get.List<String> getStringList(String path)
path - - Path of the List to get.List<Object> getMixedList(String path)
path - - Path of the List to get.<T> List<T> getTList(String path, Class<T> clazz)
path - - Path of the List to get.clazz - - The class of the type you want to get.Copyright © 2014. All rights reserved.