| java.util.LinkedHashSet org.geotools.util.CheckedHashSet
CheckedHashSet | public class CheckedHashSet extends LinkedHashSet implements CheckedCollection,Cloneable(Code) | | Acts as a typed
java.util.Set while we wait for Java 5.0.
since: 2.1 version: $Id: CheckedHashSet.java 25193 2007-04-18 13:37:38Z desruisseaux $ author: Jody Garnett (Refractions Research) author: Martin Desruisseaux MetadataEntity.unmodifiable(Object) |
Constructor Summary | |
public | CheckedHashSet(Class type) Constructs a set of the specified type. | public | CheckedHashSet(Class type, int capacity) Constructs a set of the specified type and initial capacity. |
Method Summary | |
public boolean | add(Object element) Adds the specified element to this set if it is not already present.
Parameters: element - element to be added to this set. | protected void | ensureValidType(Object element) Checks the type of the specified object. | public Class | getElementType() Returns the element type given at construction time. |
CheckedHashSet | public CheckedHashSet(Class type)(Code) | | Constructs a set of the specified type.
Parameters: type - The element type (should not be null). |
CheckedHashSet | public CheckedHashSet(Class type, int capacity)(Code) | | Constructs a set of the specified type and initial capacity.
Parameters: type - The element type (should not be null). Parameters: capacity - The initial capacity. since: 2.4 |
add | public boolean add(Object element)(Code) | | Adds the specified element to this set if it is not already present.
Parameters: element - element to be added to this set. true if the set did not already contain the specified element. throws: IllegalArgumentException - if the specified element is not of the expected type. |
ensureValidType | protected void ensureValidType(Object element) throws IllegalArgumentException(Code) | | Checks the type of the specified object. The default implementation ensure
that the object is assignable to the type specified at construction time.
Parameters: element - the object to check, or null . throws: IllegalArgumentException - if the specified element is not of the expected type. |
getElementType | public Class getElementType()(Code) | | Returns the element type given at construction time.
since: 2.4 |
|
|