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.


Method Index

 o containsKey(Object)
Returns true if this IndexMap contains a mapping for the specified key.
 o duplicates()
Returns true is this index allows duplicate keys.
 o get(Object)
Returns the value to which this IndexMap maps the specified key.
 o isEmpty()
Returns true if this IndexMap contains no key-value mappings.
 o iterator()
Returns an iterator over the IndexMap.
 o iterator(Object)
Returns an iterator on the IndexMap, starting at the given key.
 o ordered()
Returns true if this index is ordered.
 o size()
Returns the number of key-value mappings in this IndexMap.

Methods

 o ordered
  public abstract boolean ordered()
Returns true if this index is ordered.

 o duplicates
  public abstract boolean duplicates()
Returns true is this index allows duplicate keys.

 o size
  public abstract int size()
Returns the number of key-value mappings in this IndexMap.

 o isEmpty
  public abstract boolean isEmpty()
Returns true if this IndexMap contains no key-value mappings.

 o 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.
 o 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.
 o iterator
  public abstract IndexIterator iterator()
Returns an iterator over the IndexMap.

 o 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.