diva.sketch.parser2d
Class AndConstraint

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

public class AndConstraint
extends Object
implements RelationConstraint

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

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

Constructor Summary
AndConstraint()
           
 
Method Summary
 void addConstraint(RelationConstraint r)
          Add another child constraint to the test.
static void debug(String s)
          Debugging output.
 boolean test(SceneElement e1, SceneElement e2)
          Test the child constraints on the given rectangles; return true if all of them are met or there are no child 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

AndConstraint

public AndConstraint()
Method Detail

debug

public static void debug(String s)
Debugging output.


test

public boolean test(SceneElement e1,
                    SceneElement e2)
Test the child constraints on the given rectangles; return true if all of them are met or there are no child 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.