Elektra 0.11.0
|
Read only key representing a native Elektra key providing read access to its name and value. More...
Public Member Functions | |
String | toString () |
Iterator< String > | keyNameIterator () |
boolean | getBoolean () |
byte | getByte () |
short | getShort () |
int | getInt () |
long | getLong () |
float | getFloat () |
double | getDouble () |
String | getString () |
Key | dup () |
Duplicates this ReadableKey as Key . | |
Key | dup (int flags) |
Duplicates this ReadableKey as Key . | |
int | compareTo (ReadableKey other) |
Compares this key with the other key by comparing the key name with string comparison. | |
boolean | isBelow (ReadableKey other) |
Checks whether this key is sub-key of the other key. | |
boolean | isBelowOrSame (ReadableKey other) |
Checks whether this key is the same as the other key or a sub-key of the other key. | |
boolean | isDirectlyBelow (ReadableKey other) |
Checks whether this key is direct sub-key of the other key. | |
boolean | isBinary () |
boolean | isString () |
String | getName () |
int | getNameSize () |
String | getBaseName () |
int | getBaseNameSize () |
int | getValueSize () |
boolean | isNull () |
Static Public Attributes | |
static final int | KEY_CP_NAME = 1 << 0 |
Flag for use with Key#copy(Key, int) and dup(int) for copying the key name. | |
static final int | KEY_CP_STRING = 1 << 1 |
Flag for use with Key#copy(Key, int) and dup(int) for copying the key value, if it is a string. | |
static final int | KEY_CP_VALUE = 1 << 2 |
Flag for use with Key#copy(Key, int) and dup(int) for copying the key value. | |
static final int | KEY_CP_META = 1 << 3 |
Flag for use with Key#copy(Key, int) and dup(int) for copying the key metadata. | |
static final int | KEY_CP_ALL = KEY_CP_NAME | KEY_CP_VALUE | KEY_CP_META |
Flag for use with Key#copy(Key, int) and dup(int) for copying the key name, value and metadata. | |
Protected Member Functions | |
ReadableKey (Pointer pointer) | |
Constructor associating a new ReadableKey instance with a JNA pointer. | |
ReadableKey (Pointer pointer, boolean suppressCleanUp) | |
Constructor associating a new ReadableKey instance with a JNA pointerSuppressing clean-up has been introduced for usage of this binding as JNI plug-in and should normally not be used in any other case. | |
void | release () |
Clean-up method to release key reference by first decrementing its reference counter and then trying to free the native referencekeys , will get cleaned up by garbage collection as soon as they get phantom reachable. | |
Pointer | getPointer () |
Static Protected Member Functions | |
static Optional< ReadableKey > | createReadOnly (@Nullable Pointer pointer) |
Constructs a new ReadableKey instance associated with a JNA pointer. | |
Read only key representing a native Elektra key providing read access to its name and value.
@apiNote This abstraction is used to represent meta keys being read only by definition and cannot contain binary data
|
inlineprotected |
Constructor associating a new ReadableKey
instance with a JNA pointer.
pointer | JNA Pointer to key |
|
inlineprotected |
Constructor associating a new ReadableKey
instance with a JNA pointer
Suppressing clean-up has been introduced for usage of this binding as JNI plug-in and should normally not be used in any other case.
|
inline |
Compares this key with the other
key by comparing the key name with string comparison.
other | Other key to compare this key to |
other
key IllegalStateException | if this or the other ReadableKey has already been released |
IllegalArgumentException | if other is null |
|
inlinestaticprotected |
Constructs a new ReadableKey
instance associated with a JNA pointer.
pointer | Optional JNA Pointer to key |
ReadableKey
instance if pointer
is non-null, Optional#empty()
otherwise
|
inline |
Duplicates this ReadableKey
as Key
.
Key
object containing the same information as this key KeyException | if copying failed |
IllegalStateException | if this ReadableKey has already been released |
|
inline |
Duplicates this ReadableKey
as Key
.
flags | Flags indicating which parts of the key to copy Example: KEY_CP_NAME | KEY_CP_VALUE |
Key
object containing the same information as this key KeyException | if copying failed |
IllegalStateException | if this ReadableKey has already been released |
|
inline |
IllegalStateException | if this ReadableKey has already been released |
|
inline |
IllegalStateException | if this ReadableKey has already been released |
|
inline |
getString()
interpreted as boolean value KeyStringValueException | if the underlying native key is not of type string |
IllegalStateException | if this ReadableKey has already been released |
|
inline |
getString()
parsed as byte
NumberFormatException | if the getString() does not return a parsable |
KeyStringValueException | if the underlying native key is not of type string |
IllegalStateException | if this ReadableKey has already been released |
|
inline |
getString()
parsed as double
NumberFormatException | if the getString() does not return a parsable |
KeyStringValueException | if the underlying native key is not of type string |
IllegalStateException | if this ReadableKey has already been released |
|
inline |
getString()
parsed as float
NumberFormatException | if the getString() does not return a parsable |
KeyStringValueException | if the underlying native key is not of type string |
IllegalStateException | if this ReadableKey has already been released |
|
inline |
getString()
parsed as integer NumberFormatException | if the getString() does not return a parsable integer |
KeyStringValueException | if the underlying native key is not of type string |
IllegalStateException | if this ReadableKey has already been released |
|
inline |
getString()
parsed as long
NumberFormatException | if the getString() does not return a parsable |
KeyStringValueException | if the underlying native key is not of type string |
IllegalStateException | if this ReadableKey has already been released |
|
inline |
IllegalStateException | if this ReadableKey has already been released |
|
inline |
IllegalStateException | if this ReadableKey has already been released |
|
inlineprotected |
IllegalStateException | if this ReadableKey has already been released |
|
inline |
getString()
parsed as short
NumberFormatException | if the getString() does not return a parsable |
KeyStringValueException | if the underlying native key is not of type string |
IllegalStateException | if this ReadableKey has already been released |
|
inline |
KeyStringValueException | if the underlying native key is not of type string |
IllegalStateException | if this ReadableKey has already been released |
|
inline |
IllegalStateException | if this ReadableKey has already been released |
|
inline |
Checks whether this key is sub-key of the other
key.
other | Key that is used in check as parent key |
IllegalStateException | if this or the other ReadableKey has already been released |
IllegalArgumentException | if other is null |
|
inline |
Checks whether this key is the same as the other
key or a sub-key of the other
key.
other | Key that is used in check as parent key |
IllegalStateException | if this or the other ReadableKey has already been released |
IllegalArgumentException | if other is null |
|
inline |
IllegalStateException | if this ReadableKey has already been released |
|
inline |
Checks whether this key is direct sub-key of the other
key.
other | Key that is used in check as parent key |
IllegalStateException | if this or the other ReadableKey has already been released |
IllegalArgumentException | if other is null |
|
inline |
IllegalStateException | if this ReadableKey has already been released |
|
inline |
IllegalStateException | if this ReadableKey has already been released |
|
inline |
KeyNameIterator
backed by this ReadableKey
IllegalStateException | if this ReadableKey has already been released |
|
inline |
|
static |
Flag for use with Key#copy(Key, int)
and dup(int)
for copying the key value, if it is a string.
@apiNote Do not use together with KEY_CP_VALUE
|
static |
Flag for use with Key#copy(Key, int)
and dup(int)
for copying the key value.
@apiNote Do not use together with KEY_CP_STRING