Interface COM.odi.util.IndexMap
- public interface IndexMap
An IndexMap provides a mapping from keys to values. Indexes are
used by the Query class to perform query optimization, and can also
be accessed directly to lookup values or iterate in index-order. A
collection must implement the IndexedCollection interface to have
indexes (IndexedCollection provides methods for adding, removing, and
accessing the collection's indexes). Each such index implements the
IndexMap interface.
Note that a collection holds all of its indexes, but the indexes
do not have backpointers to the collection.
This class is included in PSE Pro, but not in PSE.
-
containsKey(Object)
- Returns true if this IndexMap contains a mapping for the specified
key.
-
duplicates()
- Returns true is this index allows duplicate keys.
-
get(Object)
- Returns the value to which this IndexMap maps the specified key.
-
isEmpty()
- Returns true if this IndexMap contains no key-value mappings.
-
iterator()
-
Returns an iterator over the IndexMap.
-
iterator(Object)
-
Returns an iterator on the IndexMap, starting at the given key.
-
ordered()
- Returns true if this index is ordered.
-
size()
- Returns the number of key-value mappings in this IndexMap.
ordered
public abstract boolean ordered()
- Returns true if this index is ordered.
duplicates
public abstract boolean duplicates()
- Returns true is this index allows duplicate keys.
size
public abstract int size()
- Returns the number of key-value mappings in this IndexMap.
isEmpty
public abstract boolean isEmpty()
- Returns true if this IndexMap contains no key-value mappings.
containsKey
public abstract boolean containsKey(Object key)
- Returns true if this IndexMap contains a mapping for the specified
key.
- Parameters:
- key - key whose presence in this IndexMap is to be tested.
get
public abstract Object get(Object key)
- Returns the value to which this IndexMap maps the specified key.
Returns null if the IndexMap contains no mapping for this key.
If there is more than one valued mapped to by this key,
then one such value is returned; this method is nonetheless useful
for indexes that do not have duplicate keys, and for existential
queries. See iterator().
- Parameters:
- key - key whose associated value is to be returned.
iterator
public abstract IndexIterator iterator()
- Returns an iterator over the IndexMap.
iterator
public abstract IndexIterator iterator(Object startKey)
- Returns an iterator on the IndexMap, starting at the given key.
If the IndexMap is ordered, this will return all entries
starting with the given key, in their key-order. If the IndexMap
is not ordered, it will return all of the entries with this key,
possibly followed by some number of additional entries with other
keys.
Copyright © 1996, 1997, 1998 Object Design, Inc. All rights reserved.