
| JGL - The Generic Collection Library for Java |
All Packages Class Hierarchy This Package Previous Next Index
Interface com.objectspace.jgl.Set
- public interface Set
- extends Container
Set is the interface that is implemented by all of the
Generic Container Library sets.
- See Also:
- HashSet, OrderedSet
-
serialVersionUID
-
-
clone()
- Return a shallow copy of myself.
-
count(Object)
- Return the number of items that match a particular object.
-
get(Object)
- Return the first object that matches the given object, or null if no match exists.
-
put(Object)
- If the object doesn't exist, add the object and return null, otherwise replace the
first object that matches and return the old object.
-
remove(Object)
- Remove all objects that match the given object.
-
remove(Object, int)
- Remove at most a given number of objects that match the given object.
serialVersionUID
public static final long serialVersionUID
get
public abstract Object get(Object object)
- Return the first object that matches the given object, or null if no match exists.
- Parameters:
- object - The object to match against.
- See Also:
- put
put
public abstract Object put(Object object)
- If the object doesn't exist, add the object and return null, otherwise replace the
first object that matches and return the old object.
- Parameters:
- object - The object to add.
- See Also:
- get
remove
public abstract int remove(Object key)
- Remove all objects that match the given object.
- Parameters:
- object - The object to match for removals
- Returns:
- The number of objects removed.
remove
public abstract int remove(Object key,
int count)
- Remove at most a given number of objects that match the given object.
- Parameters:
- object - The object to match for removals
- count - The maximum number of objects to remove.
- Returns:
- The number of objects removed.
count
public abstract int count(Object object)
- Return the number of items that match a particular object.
- Parameters:
- object - The object to match against.
clone
public abstract Object clone()
- Return a shallow copy of myself.
- Overrides:
- clone in class Object
All Packages Class Hierarchy This Package Previous Next Index