Opus5
Interface SearchableContainer
- All Superinterfaces:
- Comparable, Container
- All Known Subinterfaces:
- HashTable, Multiset, OrderedList, Partition, SearchTree, Set, SortedList
- All Known Implementing Classes:
- AbstractSearchableContainer
- public interface SearchableContainer
- extends Container
Encapsulates methods common to all searchable container classes.
- Version:
- $Id: SearchableContainer.java,v 3.1 1998/07/28 01:32:17 brpreiss Exp $
- Author:
- Bruno R. Preiss, P.Eng.
|
Field Summary |
static java.lang.String |
copyright
|
|
Method Summary |
Comparable |
find(Comparable object)
Finds an object in this container that equals the specified object. |
void |
insert(Comparable object)
Insert the specified object into this container. |
boolean |
isMember(Comparable object)
Tests whether the specified object instance
is contained in this container. |
void |
withdraw(Comparable obj)
Removes the specified object instance from this container. |
copyright
public static final java.lang.String copyright
isMember
public boolean isMember(Comparable object)
- Tests whether the specified object instance
is contained in this container.
- Parameters:
object - The object instance for which to search.- Returns:
- True if the specified object instance is in this container;
false otherwise.
insert
public void insert(Comparable object)
- Insert the specified object into this container.
- Parameters:
object - The object to be inserted into this container.- Throws:
ContainerFullException - If the container is full.
withdraw
public void withdraw(Comparable obj)
- Removes the specified object instance from this container.
- Parameters:
object - The object instance to be removed from this container.
find
public Comparable find(Comparable object)
- Finds an object in this container that equals the specified object.
- Parameters:
object - The target of the search.- Returns:
- The object in this container that matches the search target.
- See Also:
Comparable