xxl.collections
Class CounterContainer

java.lang.Object
  |
  +--xxl.collections.Container
        |
        +--xxl.collections.DecoratorContainer
              |
              +--xxl.collections.CounterContainer

public class CounterContainer
extends DecoratorContainer

Abstract class following the Decorator design pattern.


Field Summary
 int gets
           
 int inserts
           
 int removes
           
 int updates
           
 
Fields inherited from class xxl.collections.DecoratorContainer
container
 
Fields inherited from class xxl.collections.Container
FACTORY_METHOD
 
Constructor Summary
CounterContainer(Container container)
           
 
Method Summary
 java.lang.Object get(java.lang.Object id, boolean unfix)
          Returns the Object with the given Id.
 java.lang.Object insert(java.lang.Object object, boolean unfix)
          Inserts an Object into this Container.
 void remove(java.lang.Object id)
          Removes the Object with the given Id.
 void reset()
           
 void update(java.lang.Object id, java.lang.Object object, boolean unfix)
          Updates an existing (id,*)-entry with (id,object).
 
Methods inherited from class xxl.collections.DecoratorContainer
clear, close, contains, flush, ids, size, unfix
 
Methods inherited from class xxl.collections.Container
flush, get, getAll, getAll, insert, insertAll, insertAll, objects, removeAll, unfixAll, update, updateAll, updateAll, updateAll, updateAll
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

inserts

public int inserts

gets

public int gets

updates

public int updates

removes

public int removes
Constructor Detail

CounterContainer

public CounterContainer(Container container)
Method Detail

reset

public void reset()

get

public java.lang.Object get(java.lang.Object id,
                            boolean unfix)
                     throws java.util.NoSuchElementException
Returns the Object with the given Id.
Overrides:
get in class DecoratorContainer

insert

public java.lang.Object insert(java.lang.Object object,
                               boolean unfix)
Inserts an Object into this Container.
Returns:
the Id of the Object is returned
Overrides:
insert in class DecoratorContainer

remove

public void remove(java.lang.Object id)
            throws java.util.NoSuchElementException
Removes the Object with the given Id.
Overrides:
remove in class DecoratorContainer

update

public void update(java.lang.Object id,
                   java.lang.Object object,
                   boolean unfix)
            throws java.util.NoSuchElementException
Updates an existing (id,*)-entry with (id,object).
Parameters:
id - the id of the entry
object - the new Object for that entry
Overrides:
update in class DecoratorContainer