|
Copyright © Rasmus Sten and contributors, 1997-2004 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--nu.dll.lyskom.Selection
A Selection is tagged data, in which each object represent an ordered list of tags (keys) and perhaps some data belonging to each tag.
This implementation is not quite consistent with the LysKOM Protocol A specification, since each tag can contain multiple values (due to an early confusion during development), but it seems to be adequate for most needs.
Also, this implementation can only deal with "primitive" LysKOM types, such as INT32, Bitstring, Hollerith and their likes. If you try to set a Selection value to a KomTokenArray or another Selection, for example, you will get very unpredictable results.
Field Summary | |
static int |
DEBUG
|
Constructor Summary | |
Selection(int size)
Creates a new Selection. |
Method Summary | |
nu.dll.lyskom.Selection |
add(int key,
int value)
Adds the tag key to this selection, with the value value. |
nu.dll.lyskom.Selection |
add(int key,
java.lang.Object o)
Adds the tag key to this Selection. |
boolean |
clear(int key)
Clears the selection by removing the supplied key and its value(s). |
boolean |
contains(int key)
Returns true if this Selection contains the tag key |
int |
countKeys()
Returns the number of keys (supplied selectors) in this Selection. |
java.util.Enumeration |
get(int key)
Deprecated. This should have no real use in the real world. |
java.lang.Object |
getFirst(int key)
Deprecated. This should have no real use in the real world. |
int[] |
getIntArray(int no)
Deprecated. This should have no real use in the real world. |
int |
getIntValue(int key)
Returns an int representation of the data tagged with key, providing that the data is stored as an Integer. |
int[] |
getKeys()
Returns an array of integers representing all the selectors (keys) in this Selection. |
nu.dll.lyskom.KomTime |
getTimeValue(int key)
Returns a KomTime value stored with tag key. |
nu.dll.lyskom.KomToken |
getTokenValue(int key)
Returns a KomToken value stored with tag key. |
java.util.Vector |
getVector(int key)
Deprecated. This should have no real use in the real world. |
boolean |
remove(int key,
java.lang.Object value)
Removes the object value from the tag key. |
int |
size()
Returns the number of "trail" values in this Selection. |
nu.dll.lyskom.KomToken |
toToken()
Converts this selection into one KomToken object. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int DEBUG
Constructor Detail |
public Selection(int size)
Method Detail |
public nu.dll.lyskom.Selection add(int key, java.lang.Object o)
public nu.dll.lyskom.Selection add(int key, int value)
public boolean contains(int key)
public java.util.Enumeration get(int key) throws NoSuchKeyException
NoSuchKeyException
public int getIntValue(int key)
public nu.dll.lyskom.KomTime getTimeValue(int key)
public nu.dll.lyskom.KomToken getTokenValue(int key)
public boolean remove(int key, java.lang.Object value)
public boolean clear(int key)
public int[] getKeys()
public java.util.Vector getVector(int key) throws NoSuchKeyException
NoSuchKeyException
public int[] getIntArray(int no)
public java.lang.Object getFirst(int key) throws NoSuchKeyException
NoSuchKeyException
public int countKeys()
public int size()
public nu.dll.lyskom.KomToken toToken()
toToken
in interface Tokenizable
|
Copyright © Rasmus Sten and contributors, 1997-2004 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |