Eclipse Platform Release 3.7

## org.eclipse.equinox.p2.core
Interface IPool<T>

All Known Implementing Classes:
  StrongPool, WeakPool

    public interface IPool<T>

A Pool allows semantically equivalent objects to be shared. To be useful, objects added to the pool should implement a meaningful equals() method.

Care must be taken by users that object sharing is appropriate for their application. It is easy to "over share" objects leading to unexpected and difficult to debug behaviour.

This interface is not intended to be implemented by clients.

Since:
  2.1
Restriction:
  This interface is not intended to be implemented by clients.

Method Summary
`T` `add(T newObject)` Returns the first object from this pool which is equal to the given object.

Method Detail

### add

    T add(T newObject)

  Returns the first object from this pool which is equal to the given object. If the pool contains no such object then the object is added to the pool and returned. If the object is `null`, `null` is returned.

  Parameters:
    `newObject` - the object to add
  Returns:
    a shared object that is equal to the given object or `null`

Eclipse Platform Release 3.7

Guidelines for using Eclipse APIs.

Copyright (c) Eclipse contributors and others 2000, 2011. All rights reserved.