Elektra
0.8.25
|
Key is an essential class that encapsulates key name , value and metainfo. More...
Inherits Iterable< String >.
Public Member Functions | |
void | release () |
Clean-up method to release key reference. | |
boolean | isNull () |
Helper function that does null comparison. More... | |
String | toString () |
Basic java function that represents object as String. More... | |
java.util.Iterator< String > | iterator () |
Iterable interface function. More... | |
boolean | getBoolean () |
Data type specific accessor function. More... | |
byte | getByte () |
Data type specific accessor function. More... | |
short | getShort () |
Data type specific accessor function. More... | |
int | getInteger () |
Data type specific accessor function. More... | |
long | getLong () |
Data type specific accessor function. More... | |
float | getFloat () |
Data type specific accessor function. More... | |
double | getDouble () |
Data type specific accessor function. More... | |
void | setBoolean (final boolean v) |
Data type specific setter function. More... | |
void | setByte (final byte v) |
Data type specific setter function. More... | |
void | setShort (final short v) |
Data type specific setter function. More... | |
void | setInteger (final int v) |
Data type specific setter function. More... | |
void | setLong (final long v) |
Data type specific setter function. More... | |
void | setFloat (final float v) |
Data type specific setter function. More... | |
void | setDouble (final double v) |
Data type specific setter function. More... | |
void | setError (final String text, final Object... args) |
Helper function to set proper error meta for key. More... | |
void | addWarning (final String text, final Object... args) |
Helper function to add warning meta for key. More... | |
Key | dup () |
Duplicates the key. More... | |
void | copy (final Key source) |
Copies the information from the source key into this key. More... | |
int | getRef () |
Gets the reference counter for this key. More... | |
int | rewindMeta () |
Tries to rewind the meta information for this key. More... | |
Key | nextMeta () |
Gets the next meta information for this key. More... | |
Key | currentMeta () |
Gets the current meta information for this key. More... | |
int | copyMeta (final Key source, final String metaName) |
Helper function to copy some meta information from a source Key to this key. More... | |
int | copyAllMeta (final Key source) |
Helper function to copy all meta information from a source key to this key. More... | |
Key | getMeta (final String metaName) |
Getter for meta information. More... | |
int | setMeta (final String metaName, final String newMetaString) |
Setter for meta information. More... | |
int | cmp (final Key other) |
Helper function to compare two keys. More... | |
int | rel (final Key other) |
Helper function to check for relation between keys. More... | |
int | needsSync () |
Helper function to check if synchronization is necessary. More... | |
boolean | isBelow (final Key other) |
Helper function to check if key is sub-key of other key. More... | |
boolean | isBelowOrSame (final Key other) |
Helper function to check if key is other key or sub-key of other key. More... | |
boolean | isDirectBelow (final Key other) |
Helper function to check if key is direct sub-key of other key. More... | |
boolean | isInactive () |
Helper function to check if key is set to inactive. More... | |
boolean | isBinary () |
Helper function to check if key is binary key. More... | |
boolean | isString () |
Helper function to check if key is string key. More... | |
String | getName () |
Helper function to get key name (key part of "key-value" pair) More... | |
int | getNameSize () |
Helper function to get key name size. More... | |
void | setName (final String name) throws KeyInvalidName |
Helper function to set key name. More... | |
String | getBaseName () |
Helper function to get key base name. More... | |
int | getBaseNameSize () |
Helper function to get key base name length. More... | |
void | setBaseName (final String baseName) throws KeyInvalidName |
Helper function to set key base name; will replace current base name with new base name. More... | |
void | addBaseName (final String baseName) throws KeyInvalidName |
Helper function to add key base name; will add given base name to current key so that new key is sub key of current key. More... | |
int | getValueSize () |
Helper function to get key value size/length. More... | |
String | getString () throws KeyTypeMismatch |
Helper function to get representation of key value. More... | |
int | setString (final String newString) |
Helper function to set new key value. More... | |
Static Public Member Functions | |
static Key | create (final String name, final Object value, final Key... meta) |
Basic constructor of key class. More... | |
static Key | create (final String name, final Key... meta) |
Basic constructor of key class. More... | |
Protected Member Functions | |
Key (final long p) | |
Helper constructor for duplication by pointer in long format. More... | |
Key (final Pointer p) | |
Helper constructor for duplication by pointer. More... | |
void | finalize () throws Throwable |
Clean-up method to inform underlying c-library about the release of the key reference in jna-binding. | |
void | incRef () |
Increments the reference counter for this key. | |
void | decRef () |
Decrements the reference counter for this key. | |
Pointer | get () |
Native pointer used by JNA. More... | |
Static Protected Member Functions | |
static Key | create (final String name, final Object... args) |
Basic constructor of key class. More... | |
Key is an essential class that encapsulates key name , value and metainfo.
|
inlineprotected |
Helper constructor for duplication by pointer in long format.
p | Pointer in long format |
|
inlineprotected |
Helper constructor for duplication by pointer.
p | Pointer as Pointer object |
|
inline |
Helper function to add key base name; will add given base name to current key so that new key is sub key of current key.
baseName | New key base name to add |
KeyInvalidName |
|
inline |
Helper function to add warning meta for key.
text | Reason for the warning |
args | Custom arguments |
|
inline |
Helper function to compare two keys.
Compares the key name with normal String comparison.
other | Other Key object that is used in comparison |
|
inline |
Copies the information from the source key into this key.
Does nothing if null is provided.
source | Source Key object containing the information to copy |
|
inline |
Helper function to copy all meta information from a source key to this key.
source | Key object that is used as source |
|
inline |
Helper function to copy some meta information from a source Key to this key.
|
inlinestaticprotected |
Basic constructor of key class.
name | Key name; first part of key-value pair |
args | Arguments used for key value. Example: Key.KEY_VALUE, "custom key value", Key.KEY_END |
|
inlinestatic |
Basic constructor of key class.
name | Key name; first part of key-value pair |
value | Key value; will be determine from the object by calling Object#toString(), null is supported too |
meta | Metadata that should be added to this key, null keys will be filtered away |
|
inlinestatic |
Basic constructor of key class.
name | Key name; first part of key-value pair |
meta | Metadata that should be added to this key. Will filter null values. |
|
inline |
Gets the current meta information for this key.
|
inline |
Duplicates the key.
|
inlineprotected |
Native pointer used by JNA.
|
inline |
Helper function to get key base name.
|
inline |
Helper function to get key base name length.
|
inline |
Data type specific accessor function.
|
inline |
Data type specific accessor function.
|
inline |
Data type specific accessor function.
|
inline |
Data type specific accessor function.
|
inline |
Data type specific accessor function.
|
inline |
Data type specific accessor function.
|
inline |
|
inline |
Helper function to get key name (key part of "key-value" pair)
|
inline |
Helper function to get key name size.
|
inline |
Gets the reference counter for this key.
|
inline |
Data type specific accessor function.
|
inline |
Helper function to get representation of key value.
KeyTypeMismatch |
|
inline |
Helper function to get key value size/length.
|
inline |
Helper function to check if key is sub-key of other key.
other | Key that is used in check as parent key |
|
inline |
Helper function to check if key is other key or sub-key of other key.
other | Key that is used in check as parent key |
|
inline |
Helper function to check if key is binary key.
|
inline |
Helper function to check if key is direct sub-key of other key.
other | Key that is used in check as parent key |
|
inline |
Helper function to check if key is set to inactive.
|
inline |
Helper function that does null comparison.
|
inline |
Helper function to check if key is string key.
|
inline |
Iterable interface function.
|
inline |
Helper function to check if synchronization is necessary.
|
inline |
Gets the next meta information for this key.
|
inline |
Helper function to check for relation between keys.
other | Other Key object that is used in relation check |
|
inline |
Tries to rewind the meta information for this key.
|
inline |
Helper function to set key base name; will replace current base name with new base name.
baseName | New key base name to use |
KeyInvalidName |
|
inline |
Data type specific setter function.
v | Boolean value to set |
|
inline |
Data type specific setter function.
v | Byte value to set |
|
inline |
Data type specific setter function.
v | Double value to set |
|
inline |
Helper function to set proper error meta for key.
text | Reason for the error |
args | Custom arguments |
|
inline |
Data type specific setter function.
v | Float value to set |
|
inline |
Data type specific setter function.
v | Integer value to set |
|
inline |
Data type specific setter function.
v | Long integer value to set |
|
inline |
Setter for meta information.
metaName | Key name of meta information to be set |
newMetaString | Meta value to be set |
|
inline |
Helper function to set key name.
name | New key name to use |
KeyInvalidName |
|
inline |
Data type specific setter function.
v | Short integer value to set |
|
inline |
Helper function to set new key value.
newString | New key value to set |
|
inline |
Basic java function that represents object as String.