JavaGenes, NASA Ames. Written largely by Al Globus

gov.nasa.javaGenes.graph
Class VertexAcceptsEdge

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

public class VertexAcceptsEdge
extends java.lang.Object
implements Predicate

predicate that determines when vertices can accept an additional edge

See Also:
Serialized Form

Field Summary
protected  Edge edge
          the edge to be accepted
 
Constructor Summary
VertexAcceptsEdge()
          used when asking if any edge may be accepted
VertexAcceptsEdge(Edge e)
           
 
Method Summary
 boolean execute(java.lang.Object v)
          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

edge

protected Edge edge
the edge to be accepted

Constructor Detail

VertexAcceptsEdge

public VertexAcceptsEdge(Edge e)
Parameters:
e - the edge to be accepted. May be null to ask if any edge can be accepted.

VertexAcceptsEdge

public VertexAcceptsEdge()
used when asking if any edge may be accepted

Method Detail

execute

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

Specified by:
execute in interface Predicate
Returns:
true if v except edge. If edge == null, true if v can accept any edge

JavaGenes, NASA Ames. Written largely by Al Globus