pbwest 2004/02/25 14:23:11 Modified: src/java/org/apache/fop/datastructs Tag: FOP_0-20-0_Alt-Design SyncedNode.java Log: Made sync object mutable. Added getter and setter. Added constructor for self-synced tree root object. Revision Changes Path No revision No revision 1.1.2.4 +32 -9 xml-fop/src/java/org/apache/fop/datastructs/Attic/SyncedNode.java Index: SyncedNode.java =================================================================== RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/datastructs/Attic/SyncedNode.java,v retrieving revision 1.1.2.3 retrieving revision 1.1.2.4 diff -u -r1.1.2.3 -r1.1.2.4 --- SyncedNode.java 24 Feb 2004 07:56:34 -0000 1.1.2.3 +++ SyncedNode.java 25 Feb 2004 22:23:11 -0000 1.1.2.4 @@ -28,9 +28,25 @@ */ public class SyncedNode extends Node implements Cloneable { - public final Object sync; + protected Object sync; /** + * @return the sync + */ + public Object getSync() { + synchronized (sync) { + return sync; + } + } + /** + * @param sync to set + */ + public void setSync(Object sync) { + synchronized (this.sync) { + this.sync = sync; + } + } + /** * @param sync the object on which synchronization for this * node will occur */ @@ -40,6 +56,13 @@ } /** + * No argument constructor. Assumes that this node will sync on itself. + */ + public SyncedNode() { + super(); + this.sync = this; + } + /** * @param parent <code>Node</code> of this * @param index of this in children of parent * @param sync the object on which synchronization for this @@ -62,7 +85,7 @@ throws IndexOutOfBoundsException { super(parent); this.sync = sync; - } + } /**
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]