|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectVennDrawing.RSet
class RSet
A class representing a set object
This class object represents a set which can have only string values as members.Copyright: Copyright (c) 2008
Company: Bangladesh University of engineering and technology
Field Summary | |
---|---|
(package private) int |
id
Id of the set. |
(package private) java.util.LinkedList<java.lang.String> |
list
A list containing all members as Strings |
(package private) java.lang.String |
name
For better usability done as 0 id having name "A" |
Constructor Summary | |
---|---|
RSet()
Constructor without id. |
|
RSet(int id)
Constructor setting id |
Method Summary | |
---|---|
void |
add(java.lang.String member)
Adds a single member to its list. |
void |
add(java.lang.String[] member)
Addes array of String to the list |
boolean |
contains(java.lang.String member)
Checks whether a member belongs to this set. |
java.util.LinkedList<java.lang.String> |
getList()
Returns The list f the set |
RSet |
setIntersection(RSet set)
Performs setIntersection |
RSet |
setIntersection(RSet set,
int id)
Performs setIntersection |
RSet |
setMinus(RSet set)
Performs setMinus |
RSet |
setMinus(RSet set,
int id)
Performs setMinus |
RSet |
setUnion(RSet set)
Performs setUnion |
RSet |
setUnion(RSet set,
int id)
Performs setUnion |
java.lang.String |
toString()
String representation of this obejct |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
int id
java.lang.String name
java.util.LinkedList<java.lang.String> list
Constructor Detail |
---|
public RSet(int id)
id
- id of the setpublic RSet()
Method Detail |
---|
public void add(java.lang.String member)
public void add(java.lang.String[] member)
member
- array of memberspublic boolean contains(java.lang.String member)
member
- the string which is checked whether belongs to the set.
public java.util.LinkedList<java.lang.String> getList()
public RSet setUnion(RSet set, int id)
set
- the union done with this set and "set" paramid
- the id of the new set produced
public RSet setUnion(RSet set)
set
- the union done with this set and "set" param
public RSet setIntersection(RSet set, int id)
set
- the intersection done with this set and "set" paramid
- the id of the new set produced
public RSet setIntersection(RSet set)
set
- the intersection done with this set and "set" param
public RSet setMinus(RSet set)
set
- the setMinus done with this set and "set" param
id the id of the new set produced
public RSet setMinus(RSet set, int id)
set
- the setMinus done with this set and "set" paramid
- the id of the new set produced
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |