Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## oracle.ifs.utils.common
Class UniqueIdMap

    java.lang.Object
      oracle.ifs.utils.common.UniqueIdMap

    public class UniqueIdMap

extends java.lang.Object

UniqueIdMap is a class that provides unique identifiers for its elements and constant-time access to the elements by id.

Constructor Summary
`UniqueIdMap()` Create a new UniqueIdMap with default initial capacity.
`UniqueIdMap(int n)` Create a new UniqueIdMap with the given initial capacity.

Method Summary
`java.lang.Object` | `get(int id)` Get the element with the provided unique identifier.
`int` | `put(java.lang.Object obj)` Add an element to the map.
`void` | `remove(int id)` Remove the element with the provided unique identifier.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### UniqueIdMap

    public UniqueIdMap()

  Create a new UniqueIdMap with default initial capacity.

### UniqueIdMap

    public UniqueIdMap(int n)

  Create a new UniqueIdMap with the given initial capacity.

Method Detail

### put

    public int put(java.lang.Object obj)

  Description copied from class: `UniqueIdMap`
  Add an element to the map.

  Returns:
    the unique identifier Constraint: If the maximum number of elements ever simultaneously contained in the map is N, then the unique identifier will be less than or equal to N.

### get

    public java.lang.Object get(int id)

  Description copied from class: `UniqueIdMap`
  Get the element with the provided unique identifier.

  Returns:
    the element with the given unique id, or null, if id is not in use.

### remove

    public void remove(int id)

  Description copied from class: `UniqueIdMap`
  Remove the element with the provided unique identifier. The given identifier will be freed for later reuse.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD