| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--org.jutil.structure.DoubleBinding
DEPRECATEDA class of "components" for implementing a double binding.
This is actually a lightweight version of the APSet-APElement combination of the Beedra framework of Jan Dockx.
The classes that are linked together should still be in the same package, but are easier to implement using DoubleBinding. A "native" binding is more efficient, but an optimizer could do the transformation in order to get both the programming and the efficiency benefits.
This class is typically used in the following way:
 public class A {
   public A() {
     $b= new DoubleBinding(this);
   }
 
   public B getB() {
     return (B)$b.getOtherEnd();
   }
 
   public void setB(B b) {
     if (b != null) {
       $b.setOtherBinding(b.getALink());
     }
     else {
       $b.setOtherBinding(null);
     }
   }
 
   private DoubleBinding $b;
   private String $name;
 }
 
 public class B {
 
   public B() {
     $a = new DoubleBinding(this);
   }
 
   public A getA() {
     return (A)$a.getOtherEnd();
   }
 
   DoubleBinding getALink() {
     return $a;
   }
   private String $name;
 }
| Class Specifications | 
| public invariant getObject() != null; public invariant getOtherBinding() != null ==> getOtherBinding().getOtherBinding() == this; | 
| Field Summary | |
| static java.lang.String | CVS_REVISIONDeprecated. | 
| Constructor Summary | |
| DoubleBinding(java.lang.Object object)Deprecated. Initialize a new unconnected DoubleBinding. | |
| DoubleBinding(DoubleBinding otherBinding,
              java.lang.Object object)Deprecated. Initialize a new double binding connected to the given other DoubleBinding. | |
| Method Summary | |
|  java.lang.Object | getObject()Deprecated. Return the object at this side of the double binding. | 
|  DoubleBinding | getOtherBinding()Deprecated. Return the DoubleBinding object this one is connected to. | 
|  java.lang.Object | getOtherEnd()Deprecated. Return the Object at the other end of this double binding. | 
|  boolean | isConnected()Deprecated. Check whether or not this DoubleBinding is connected to another. | 
|  void | setOtherBinding(DoubleBinding otherBinding)Deprecated. Set the other end of this binding | 
| 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 DoubleBinding(java.lang.Object object)
object - The object on this side of the double binding
public DoubleBinding(DoubleBinding otherBinding,
                     java.lang.Object object)
other - The DoubleBinding object to connect to.object - The object on this side of the double binding| Method Detail | 
public java.lang.Object getObject()
public boolean isConnected()
public java.lang.Object getOtherEnd()
public DoubleBinding getOtherBinding()
public void setOtherBinding(DoubleBinding otherBinding)
otherBinding - The new DoubleBinding object that will be connected to this.| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||