JavaGenes, NASA Ames. Written largely by Al Globus

gov.nasa.javaGenes.graph
Class AcceptableSecondBrokenEdge

java.lang.Object
  extended bygov.nasa.javaGenes.graph.AcceptableSecondBrokenEdge
All Implemented Interfaces:
Predicate, java.io.Serializable

public class AcceptableSecondBrokenEdge
extends java.lang.Object
implements Predicate

The execute() method will determine whether a BrokenEdge may be merged with the BrokenEdge argument to the constructor.

See Also:
Serialized Form

Field Summary
protected  BrokenEdge first
           
protected  boolean mustBeCompatible
           
 
Constructor Summary
AcceptableSecondBrokenEdge(BrokenEdge b, boolean compatible)
           
 
Method Summary
 boolean execute(java.lang.Object object)
          executes this predicate on object
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

first

protected BrokenEdge first

mustBeCompatible

protected boolean mustBeCompatible
Constructor Detail

AcceptableSecondBrokenEdge

public AcceptableSecondBrokenEdge(BrokenEdge b,
                                  boolean compatible)
Parameters:
b - BrokenEdge seeking a compatible BrokenEdge
compatible - determines whether the BrokenEdges must be compatible (isCompatible() returns true) to be merged (for example, both be double bonds). If "compatible" is false, the merger can take place so long as the vertex attached to the execute() argument can accept any edge and the merger won't create a length one loop.
Method Detail

execute

public boolean execute(java.lang.Object object)
Description copied from interface: Predicate
executes this predicate on object

Specified by:
execute in interface Predicate
Parameters:
object - BrokenEdge object to be checked for compatibility

JavaGenes, NASA Ames. Written largely by Al Globus