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

## kieker.common.util.registry
Class Lookup<E>

    java.lang.Object
      kieker.common.util.registry.Lookup<E>

Type Parameters:
  `E` - the type of the objects

All Implemented Interfaces:
  ILookup<E>, IRegistry<E>

    public final class Lookup<E>

extends Object
implements ILookup<E>

Since:
  1.8
Author:
  Jan Waller

Constructor Summary
`Lookup()` Create a new lookup entry.

Method Summary
`int` | `get(E value)` Gets a unique id for an object.
`E` | `get(int i)` Gets the object associated with the unique id.
`E[]` | `getAll()` Return an array with all registered objects.
`E` | `getNonBlocking(int i)` Get a record from the underlying object array.
`int` | `getSize()` Returns the number of registered objects.
`boolean` | `set(E value, int id)` Registers the object with the unique id.
`void` | `setRecordReceiver(IMonitoringRecordReceiver recordReceiver)` Deprecated. This method is not supported by this implementation.

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

Constructor Detail

### Lookup

    public Lookup()

  Create a new lookup entry.

Method Detail

### get

    public int get(E value)

  Description copied from interface: `IRegistry`
  Gets a unique id for an object.

  Specified by:
    `get` in interface `IRegistry<E>`
  Parameters:
    `value` - the object
  Returns:
    the unique id

### getNonBlocking

    public E getNonBlocking(int i)

  Get a record from the underlying object array.

  Parameters:
    `i` - the index for the array
  Returns:
    the object in the array or null if the array bounds are exceeded

### getAll

    public E[] getAll()

  Description copied from interface: `IRegistry`
  Return an array with all registered objects.

  Specified by:
    `getAll` in interface `IRegistry<E>`
  Returns:
    array of registered objects

### getSize

    public int getSize()

  Description copied from interface: `IRegistry`
  Returns the number of registered objects.

  Specified by:
    `getSize` in interface `IRegistry<E>`
  Returns:
    number of registered objects

### get

    public E get(int i)

  Description copied from interface: `IRegistry`
  Gets the object associated with the unique id.

  Specified by:
    `get` in interface `IRegistry<E>`
  Parameters:
    `i` - the unique id
  Returns:
    the associated object

### set

    public boolean set(E value,
                       int id)

  Description copied from interface: `ILookup`
  Registers the object with the unique id.

  Specified by:
    `set` in interface `ILookup<E>`
  Parameters:
    `value` - the object
    `id` - the unique id
  Returns:
    false on duplicate id

### setRecordReceiver

    @Deprecated
    public void setRecordReceiver(IMonitoringRecordReceiver recordReceiver)

  Deprecated. This method is not supported by this implementation.

  Description copied from interface: `IRegistry`
  Enables logging of newly registered objects. Must only be called for E == String

  Specified by:
    `setRecordReceiver` in interface `IRegistry<E>`
  Parameters:
    `recordReceiver` - has no special property.

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

Copyright 2014 Kieker Project, http://kieker-monitoring.net