Main Page   Packages   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  

GenericSet Class Reference

List of all members.

Public Methods

 GenericSet ()
 GenericSet (Object e)
 GenericSet (Vector v)
void addElemToSet (Object ele)
boolean contains (Object e)
GenericSet difference (GenericSet s)
boolean equals (GenericSet another)
GenericSet intersect (GenericSet s)
void remove (Object ele)
Object setRef (int i)
int size ()
String toString ()
GenericSet union (GenericSet s)

Static Public Methods

void main (String args[])

Private Attributes

Vector set

Detailed Description

Generic set class. It is not a fully functional set class yet. It only has a union method. It does not construct a new set when union is used. All will be changed as soon as time permits. It is not need right now and it should not drastically change the interface, but it might. It is used in wrapper classes so it shouldn't affect things very much. All elements should be mappable.

Author:
Shawn Laubach
Version:
0.2

Definition at line 50 of file GenericSet.java.


Constructor & Destructor Documentation

GenericSet::GenericSet   [inline]
 

Creates a new empty set.

Definition at line 57 of file GenericSet.java.

Referenced by difference(), intersect(), and union().

GenericSet::GenericSet Object   e [inline]
 

Creates a new set with a single element.

Parameters:
e   the single element.

Definition at line 66 of file GenericSet.java.


Member Function Documentation

boolean GenericSet::contains Object   e [inline]
 

Checks if an element is in the set.

Parameters:
m   the element
Returns:
True if m is an element of the set, otherwise false.

Definition at line 86 of file GenericSet.java.

Referenced by difference(), intersect(), and union().

GenericSet GenericSet::difference GenericSet   s [inline]
 

Finds the difference between two sets.

Parameters:
s   another set.

Definition at line 95 of file GenericSet.java.

GenericSet GenericSet::intersect GenericSet   s [inline]
 

Intersects another set together.

Parameters:
s   another set.

Definition at line 133 of file GenericSet.java.

Object GenericSet::setRef int   i [inline]
 

Gets the ith element from the set.

Parameters:
i   the element position
Returns:
The ith element.

Definition at line 174 of file GenericSet.java.

int GenericSet::size   [inline]
 

Returns the number of elements in the set.

Returns:
The number of elements in the set.

Definition at line 183 of file GenericSet.java.

Referenced by union().

String GenericSet::toString   [inline]
 

Converts the set to a string

Returns:
String representation of the set.

Definition at line 192 of file GenericSet.java.

GenericSet GenericSet::union GenericSet   s [inline]
 

Unions another set together.

Parameters:
s   another set.

Definition at line 201 of file GenericSet.java.


The documentation for this class was generated from the following file:
Generated at Thu Feb 7 07:11:56 2002 for Bandera by doxygen1.2.10 written by Dimitri van Heesch, © 1997-2001