Scroll to navigation

org.libelektra.KeySet(3elektra) Elektra org.libelektra.KeySet(3elektra)

NAME

org.libelektra.KeySet - A keyset holds together a set of keys.

SYNOPSIS

Inherits Iterable< Key >.

Public Member Functions


void release ()
Clean-up method to release keyset reference. java.util.Iterator< Key > iterator ()
Iterable interface function. String toString ()
Basic java function that represents object as String. KeySet dup ()
Duplicates the key set. int copy (final KeySet other)
Copies key references from other key set. int needsSync ()
Helper function to check if synchronization is necessary. int length ()
Helper function that returns key set size. int append (final Key k)
Helper function to append key to key set. int append (final KeySet ks)
Helper function that appends keys of key set. KeySet cut (final Key cutpoint)
Helper function that creates new key set with help of a cut point. Key pop ()
Helper function that returns key from key set and also removes it from the set. Key current ()
Helper function that returns current key from the key set. Key next ()
Helper function that returns the next key in the key set. int rewind ()
Helper function that rewinds the current key set. Key head ()
Helper function that gets the key set head. Key tail ()
Helper function that gets the key set tail. int getCursor ()
Helper function that gets the current cursor of the key set. int setCursor (final int cursor)
Helper function that sets the current cursor of the key set. Key at (final int cursor)
Helper function that gets the Key at the given cursor position. Key lookup (final Key find, final int options)
Helper function to search for a key in the key set. Key lookup (final Key find)
Helper function to search for a key in the key set. Key lookup (final String find, final int options)
Helper function to search for a key in the key set. Key lookup (final String find)
Helper function to search for a key in the key set.

Static Public Member Functions


static KeySet create (final int alloc, final Key... args)
Basic constructor for key set.

Protected Member Functions


KeySet (final long p)
Helper constructor for duplication by pointer in long format. KeySet (final Pointer p)
Helper constructor for duplication by pointer. void finalize () throws Throwable
Clean-up method to inform underlying c-library about the release of the keyset reference. Pointer get ()
Native pointer used by JNA.

Static Protected Member Functions


static KeySet create (final int alloc, final Object... args)
Basic constructor for key set.

Detailed Description

A keyset holds together a set of keys.

Constructor & Destructor Documentation

org.libelektra.KeySet.KeySet (final long p) [inline], [protected]

Helper constructor for duplication by pointer in long format.

Parameters:

p Pointer to another KeySet in long format

org.libelektra.KeySet.KeySet (final Pointer p) [inline], [protected]

Helper constructor for duplication by pointer.

Parameters:

p Pointer to another KeySet

Member Function Documentation

int org.libelektra.KeySet.append (final Key k) [inline]

Helper function to append key to key set. Does nothing if null is provided.

Parameters:

k Key to append

Returns:

Index of key in key set; starting from 1, -1 if null was provided

int org.libelektra.KeySet.append (final KeySet ks) [inline]

Helper function that appends keys of key set.

Parameters:

ks Key set to append

Returns:

Highest new index of key in key set; starting from 1, -1 if null was provided

Key org.libelektra.KeySet.at (final int cursor) [inline]

Helper function that gets the Key at the given cursor position.

Parameters:

cursor Cursor position used to fetch key; starting from 0

Returns:

Key at given cursor position

int org.libelektra.KeySet.copy (final KeySet other) [inline]

Copies key references from other key set.

Parameters:

other Key set that is used as source

Returns:

1 in case of success, 0 if source was NULL and dest (this) was cleared successfully, -1 in case of an error (null pointer)

static KeySet org.libelektra.KeySet.create (final int alloc, final Object... args) [inline], [static], [protected]

Basic constructor for key set.

Parameters:

alloc Length of key set (key count) to be allocated
args List of initial arguments for the key set. Example:
new Key(...), new Key(...), existing_key_reference, KeySet.KS_END

Returns:

New key set with the given initial data

static KeySet org.libelektra.KeySet.create (final int alloc, final Key... args) [inline], [static]

Basic constructor for key set.

Parameters:

alloc Length of key set (key count) to be allocated
args List of initial keys for the key set.

Returns:

New key set with the given initial data

Key org.libelektra.KeySet.current () [inline]

Helper function that returns current key from the key set.

Returns:

Current Key in iteration

KeySet org.libelektra.KeySet.cut (final Key cutpoint) [inline]

Helper function that creates new key set with help of a cut point.

Parameters:

cutpoint Key that is used as cutting point

Returns:

New KeySet containing all keys until the cutting point, this if null was provided

KeySet org.libelektra.KeySet.dup () [inline]

Duplicates the key set.

Returns:

New KeySet containing the same key references as this object does

Pointer org.libelektra.KeySet.get () [inline], [protected]

Native pointer used by JNA.

Returns:

Native pointer object used for this key set

int org.libelektra.KeySet.getCursor () [inline]

Helper function that gets the current cursor of the key set.

Returns:

Cursor position as integer; initially -1, incremented by next()

Key org.libelektra.KeySet.head () [inline]

Helper function that gets the key set head.

Returns:

First element of the key set

java.util.Iterator<Key> org.libelektra.KeySet.iterator () [inline]

Iterable interface function.

Returns:

Custom KeySetIterator

int org.libelektra.KeySet.length () [inline]

Helper function that returns key set size.

Returns:

Size of key set (number of possible keys)

Key org.libelektra.KeySet.lookup (final Key find, final int options) [inline]

Helper function to search for a key in the key set.

Parameters:

find Key used in search
options Custom search options; concatenation of flags

Returns:

Key if search successful, null otherwise

Key org.libelektra.KeySet.lookup (final Key find) [inline]

Helper function to search for a key in the key set.

Parameters:

find Key used in search

Returns:

Key if search successful, null otherwise

Key org.libelektra.KeySet.lookup (final String find, final int options) [inline]

Helper function to search for a key in the key set.

Parameters:

find Key name used in search
options Custom search options; concatenation of flags

Returns:

Key if search successful, null otherwise

Key org.libelektra.KeySet.lookup (final String find) [inline]

Helper function to search for a key in the key set.

Parameters:

find Key name used in search

Returns:

Key if search successful, null otherwise

int org.libelektra.KeySet.needsSync () [inline]

Helper function to check if synchronization is necessary.

Returns:

1 if sync is necessary, 0 if no sync is necessary, -1 in case of an error (null key)

Key org.libelektra.KeySet.next () [inline]

Helper function that returns the next key in the key set.

Returns:

Next Key in key set

Key org.libelektra.KeySet.pop () [inline]

Helper function that returns key from key set and also removes it from the set.

Returns:

First Key in the set

int org.libelektra.KeySet.rewind () [inline]

Helper function that rewinds the current key set.

Returns:

int org.libelektra.KeySet.setCursor (final int cursor) [inline]

Helper function that sets the current cursor of the key set.

Parameters:

cursor Cursor position as integer

Returns:

1 in case of success

Key org.libelektra.KeySet.tail () [inline]

Helper function that gets the key set tail.

Returns:

Last element of the key set

String org.libelektra.KeySet.toString () [inline]

Basic java function that represents object as String.
Iterates though all keys in this key set and appends their representation to the output. Uses the toString() function of the Key objects.

Returns:

List of key-value pairs contained in this key set

Author

Generated automatically by Doxygen for Elektra from the source code.

Mon Jan 15 2018 Version 0.8.20