|
OSMQ v2.0.1 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectosmq.util.KeyedOrderedList
A collection of objects accessible by position or key.
Items may be accessed by row position (zero offset) or key value.
Field Summary | |
static int |
ADDED
|
static int |
NONE
|
static int |
REMOVED
|
static int |
REPLACED
|
Constructor Summary | |
KeyedOrderedList()
|
Method Summary | |
long |
added()
|
void |
clear()
Removes all table entries and resets counters to zero. |
java.lang.Object |
clone()
|
boolean |
contains(java.lang.Object k)
Identifies whether there is a KeyedData item in the set with a matching key value |
KeyedData |
first()
Returns the first KeyedData item in the collection, or null if the collection is empty. |
KeyedData |
get(int p)
Returns the KeyedData item at row position p; |
KeyedData |
get(java.lang.Object k)
Returns the KeyedData item with the key value of k. |
java.util.Iterator |
getIterator()
Returns an iterator to the KeyedOrderedList. |
int |
getLastChange()
|
KeyedData |
getNext()
First call returns the first KeyedData item in the collection, and subsequent calls return each of the subsequent items. |
boolean |
isEmpty()
|
boolean |
isUseKeys()
Returns true if keys are being used. |
static KeyedOrderedList |
loadList(java.lang.String filename)
Creates a KeyedOrderedList from the serialized instance saved to a file. |
void |
put(KeyedData r)
Adds a KeyedData item to the list if there is no item with a matching key. |
void |
remove(int p)
Removes a KeyedData item from the list. |
void |
save(java.lang.String filename)
Saves a serialized instance of the KeyedOrderedList to a file. |
void |
setUseKeys(boolean k)
If true, key value of object will determine whether an object is added or replaced when put() is called. |
void |
showContents()
|
void |
showContents(Log lg)
|
int |
size()
|
long |
updated()
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int NONE
public static final int ADDED
public static final int REPLACED
public static final int REMOVED
Constructor Detail |
public KeyedOrderedList()
Method Detail |
public final int size()
public final boolean isEmpty()
public final long added()
public final long updated()
public void put(KeyedData r)
r
- KeyedData item to add/replace in the listpublic final KeyedData get(java.lang.Object k)
public final KeyedData get(int p)
public final boolean contains(java.lang.Object k)
public final void setUseKeys(boolean k)
public final boolean isUseKeys()
public final void remove(int p)
p
- position in the list of element to be removed.public final int getLastChange()
public final KeyedData getNext()
public final KeyedData first()
public static KeyedOrderedList loadList(java.lang.String filename)
filename
- name of the file containing the serialized KeyedOrderedList instance.public void save(java.lang.String filename)
filename
- name to assign the file.public void showContents(Log lg)
public void showContents()
public final void clear()
public java.util.Iterator getIterator()
public java.lang.Object clone()
|
(c) 2000 - 2003 MQue Systems All Rights Reserved |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |