org.expasy.jpl.commons.collection
Interface Pool<T extends Cachable>

Type Parameters:
T - the object type.
All Superinterfaces:
Register<T>
All Known Implementing Classes:
PoolImpl

public interface Pool<T extends Cachable>
extends Register<T>

A Pool interface should be implemented by any pool that handles unique objects.

Version:
1.0
Author:
nikitin

Nested Class Summary
static class Pool.KeyAlreadyExistException
          Exception thrown when key already already reference an object in the pool.
static class Pool.ObjectAlreadyExistException
          Exception thrown when object already exists in the pool.
 
Method Summary
 Set<String> getKeys()
          Get keys of all stored objects.
 Set<T> getValues()
          Get values of all stored objects.
 boolean isRegistered(T o)
          Return true if object exists in pool.
 
Methods inherited from interface org.expasy.jpl.commons.collection.Register
clear, isRegistered, lookup, register, size, unregister
 

Method Detail

isRegistered

boolean isRegistered(T o)
Return true if object exists in pool.

Parameters:
o - the object.
Returns:
true if exists.

getKeys

Set<String> getKeys()
Get keys of all stored objects.

Returns:
the key set.

getValues

Set<T> getValues()
Get values of all stored objects.

Returns:
the value set.


Copyright (c) 2012 Swiss Institute of Bioinformatics. All rights reserved.