public abstract class MapJid<KEY_TYPE extends Comparable<KEY_TYPE>,VALUE_TYPE extends Jid> extends ListJid<MapEntry<KEY_TYPE,VALUE_TYPE>> implements JAMap<KEY_TYPE,VALUE_TYPE>, Collection<MapEntry<KEY_TYPE,VALUE_TYPE>>
| Modifier and Type | Field and Description |
|---|---|
org.agilewiki.jactor.factory.ActorFactory |
valueFactory |
entryFactory, initialCapacity, listlenserializedBytes, serializedOffset| Constructor and Description |
|---|
MapJid() |
| Modifier and Type | Method and Description |
|---|---|
int |
ceiling(KEY_TYPE key)
Locate the entry with the first element >= a key.
|
MapEntry<KEY_TYPE,VALUE_TYPE> |
getCeiling(KEY_TYPE key)
Returns the JID value with the smallest key >= the given key.
|
protected org.agilewiki.jactor.factory.ActorFactory |
getEntryFactory()
Returns the actor type of all the elements in the list.
|
MapEntry<KEY_TYPE,VALUE_TYPE> |
getFirst() |
MapEntry<KEY_TYPE,VALUE_TYPE> |
getHigher(KEY_TYPE key)
Returns the JID value with a greater key.
|
protected abstract org.agilewiki.jactor.factory.ActorFactory |
getKeyFactory()
Returns the JidFactory for the key.
|
MapEntry<KEY_TYPE,VALUE_TYPE> |
getLast() |
KEY_TYPE |
getLastKey() |
protected org.agilewiki.jactor.factory.ActorFactory |
getValueFactory()
Returns the JidFactory for the values in the map.
|
int |
higher(KEY_TYPE key)
Locate the entry with a higher key.
|
VALUE_TYPE |
kGet(KEY_TYPE key)
Returns the JID value associated with the key.
|
MapEntry<KEY_TYPE,VALUE_TYPE> |
kGetEntry(KEY_TYPE key) |
Boolean |
kMake(KEY_TYPE key)
Add an entry to the map unless there is an entry with a matching first element.
|
Boolean |
kMakeBytes(KEY_TYPE key,
byte[] bytes)
Add a tuple to the map unless there is a tuple with a matching first element.
|
boolean |
kRemove(KEY_TYPE key)
Removes the item identified by the key.
|
void |
kSetBytes(KEY_TYPE key,
byte[] bytes) |
int |
match(KEY_TYPE key)
Locate the entry with the first element >= a key, or the last entry.
|
_Jid |
resolvePathname(String pathname)
Resolves a JID pathname, returning a JID actor or null.
|
int |
search(KEY_TYPE key)
Locate the entry with a matching first element.
|
protected abstract KEY_TYPE |
stringToKey(String skey)
Converts a string to a key.
|
empty, getSerializedLength, iAdd, iAddBytes, iGet, initializeList, iRemove, iSetBytes, load, serialize, sizechange, loadLen, saveLen, skipLenchanged, copyJID, createSubordinate, createSubordinate, createSubordinate, createSubordinate, createSubordinate, createSubordinate, createSubordinate, createSubordinate, createSubordinate, createSubordinate, createSubordinate, createSubordinate, getSerializedBytes, isJidEqual, isSerialized, readable, save, setContainerJidacceptEvent, acceptRequest, getActorType, getAncestor, getExceptionHandler, getFactory, getMailbox, getMailboxFactory, getMatch, getParent, hasDataItem, haveEvents, initialize, initialize, initialize, initialize, initialize, requirements, responseFrom, send, send, sendEvent, setExceptionHandler, setInitialBufferCapacityclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitiGet, iSetBytes, sizechange, getSerializedLength, load, save, setContainerJidprotected abstract org.agilewiki.jactor.factory.ActorFactory getKeyFactory()
protected abstract KEY_TYPE stringToKey(String skey)
skey - The string to be converted.protected final org.agilewiki.jactor.factory.ActorFactory getEntryFactory()
throws Exception
getEntryFactory in class ListJid<MapEntry<KEY_TYPE extends Comparable<KEY_TYPE>,VALUE_TYPE extends Jid>>Exceptionprotected org.agilewiki.jactor.factory.ActorFactory getValueFactory()
throws Exception
Exceptionpublic final int search(KEY_TYPE key) throws Exception
key - The key which matches to the entry's first element.Exceptionpublic final int higher(KEY_TYPE key) throws Exception
key - The key which matches to the entry's first element.Exceptionpublic final int match(KEY_TYPE key) throws Exception
key - The key which matches to the entry's first element, or size.Exceptionpublic final int ceiling(KEY_TYPE key) throws Exception
key - The key which matches to the entry's first element.Exceptionpublic final Boolean kMake(KEY_TYPE key) throws Exception
kMake in interface JAMap<KEY_TYPE extends Comparable<KEY_TYPE>,VALUE_TYPE extends Jid>key - Used to match the first element of the entries.Exceptionpublic Boolean kMakeBytes(KEY_TYPE key, byte[] bytes) throws Exception
kMakeBytes in interface JAMap<KEY_TYPE extends Comparable<KEY_TYPE>,VALUE_TYPE extends Jid>key - Used to match the first element of the tuples.bytes - The serialized form of a JID of the appropriate type.Exceptionpublic final MapEntry<KEY_TYPE,VALUE_TYPE> kGetEntry(KEY_TYPE key) throws Exception
Exceptionpublic final VALUE_TYPE kGet(KEY_TYPE key) throws Exception
kGet in interface JAMap<KEY_TYPE extends Comparable<KEY_TYPE>,VALUE_TYPE extends Jid>key - The key.Exceptionpublic final MapEntry<KEY_TYPE,VALUE_TYPE> getHigher(KEY_TYPE key) throws Exception
getHigher in interface JAMap<KEY_TYPE extends Comparable<KEY_TYPE>,VALUE_TYPE extends Jid>key - The key.Exceptionpublic final MapEntry<KEY_TYPE,VALUE_TYPE> getCeiling(KEY_TYPE key) throws Exception
getCeiling in interface JAMap<KEY_TYPE extends Comparable<KEY_TYPE>,VALUE_TYPE extends Jid>key - The key.Exceptionpublic final boolean kRemove(KEY_TYPE key) throws Exception
kRemove in interface JAMap<KEY_TYPE extends Comparable<KEY_TYPE>,VALUE_TYPE extends Jid>key - The key.Exceptionpublic final _Jid resolvePathname(String pathname) throws Exception
resolvePathname in interface _JidresolvePathname in class ListJid<MapEntry<KEY_TYPE extends Comparable<KEY_TYPE>,VALUE_TYPE extends Jid>>pathname - A JID pathname.Exception - Any uncaught exception which occurred while processing the request.public MapEntry<KEY_TYPE,VALUE_TYPE> getFirst() throws Exception
getFirst in interface JAMap<KEY_TYPE extends Comparable<KEY_TYPE>,VALUE_TYPE extends Jid>Exceptionpublic MapEntry<KEY_TYPE,VALUE_TYPE> getLast() throws Exception
getLast in interface JAMap<KEY_TYPE extends Comparable<KEY_TYPE>,VALUE_TYPE extends Jid>Exceptionpublic void kSetBytes(KEY_TYPE key, byte[] bytes) throws Exception
kSetBytes in interface JAMap<KEY_TYPE extends Comparable<KEY_TYPE>,VALUE_TYPE extends Jid>ExceptionCopyright © 2013. All Rights Reserved.