|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--org.jutil.structure.StructureSet
DEPRECATEDA class of "components" for inplementing a 1-n binding. This class is the 1 side of the binding (the side where the "n" is in a UML diagram).
This is actually a lightweight version of the APSet-APElement combination of the Beedra framework of Jan Dockx.
This class is typically using in the following way. See class StructureElement for class B.
public class A {
public A() {
$b= new StructureSet(this);
}
public Set getBs() {
return $b.getOtherEnds();
}
public void addB(B b) {
$b.add(b.getALink());
}
public void removeB(B b) {
$b.remove(b.getALink());
}
private StructureSet $b;
}
| Class Specifications |
|
public invariant contains(null) == false; public invariant getObject() != null; public invariant ( \forall StructureElement e; contains(e); e.getStructureSet() == this); |
| Field Summary | |
static java.lang.String |
CVS_REVISION
Deprecated. |
| Constructor Summary | |
StructureSet(java.lang.Object object)
Deprecated. Initialize an empty StructureSet for the given object. |
|
| Method Summary | |
void |
add(StructureElement element)
Deprecated. Remove the given StructureElement from this StructureSet. |
boolean |
contains(StructureElement element)
Deprecated. Check whether or not the given element is connected to this StructureSet. |
java.lang.Object |
getObject()
Deprecated. Return the object at the 1 side of the 1-n binding. |
java.util.Set |
getOtherEnds()
Deprecated. Return a set containing the objects at the n side of the 1-n binding. |
java.util.Set |
getStructureElements()
Deprecated. Return a set containing the StructureElements at the n side of the 1-n binding. |
(package private) void |
register(StructureElement element)
Deprecated. Add the given StructureElement to this StructureSet |
void |
remove(StructureElement element)
Deprecated. Add the given StructureElement to this StructureSet. |
int |
size()
Deprecated. Return the size of the StructureSet |
(package private) void |
unregister(StructureElement element)
Deprecated. Remove the given StructureElement from this StructureSet |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final java.lang.String CVS_REVISION
| Constructor Detail |
public StructureSet(java.lang.Object object)
object - The 1 side of the 1-n binding| Method Detail |
public java.lang.Object getObject()
public void remove(StructureElement element)
element - The StructureElement to be added.public void add(StructureElement element)
element - The StructureElement to be removed.public java.util.Set getOtherEnds()
public java.util.Set getStructureElements()
void unregister(StructureElement element)
element - The element to be removed.void register(StructureElement element)
element - The element to be added.public int size()
public boolean contains(StructureElement element)
element - The element of which one wants to know if it is in
this StructureSet.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||