diva.sketch.parser2d
Class OrConstraint

java.lang.Object
  extended by diva.sketch.parser2d.OrConstraint
All Implemented Interfaces:
RelationConstraint

public class OrConstraint
extends Object
implements RelationConstraint

A composite constraint that ORs together the results of its child constraint objects.

Version:
$Revision: 1.6 $
Author:
Michael Shilman (michaels@eecs.berkeley.edu)

Constructor Summary
OrConstraint()
           
 
Method Summary
 void addConstraint(RelationConstraint r)
          Add another child constraint to the test.
 boolean test(SceneElement e1, SceneElement e2)
          Test the child constraints on the given rectangles; return true if any constraints are met or there are no constraints, false otherwise.
 String toString()
          Print out the contents of this constraint.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

OrConstraint

public OrConstraint()
Method Detail

test

public boolean test(SceneElement e1,
                    SceneElement e2)
Test the child constraints on the given rectangles; return true if any constraints are met or there are no constraints, false otherwise.

Specified by:
test in interface RelationConstraint

addConstraint

public void addConstraint(RelationConstraint r)
Add another child constraint to the test.


toString

public String toString()
Print out the contents of this constraint.

Overrides:
toString in class Object


Copyright © 2015 Central Laboratory of the Research Councils. All Rights Reserved.