de.grogra.graph
Class EdgePatternImpl

java.lang.Object
  extended by de.grogra.graph.EdgePatternImpl
All Implemented Interfaces:
EdgePattern

public class EdgePatternImpl
extends java.lang.Object
implements EdgePattern


Field Summary
static EdgePatternImpl FORWARD
           
static EdgePatternImpl TREE
           
 
Constructor Summary
EdgePatternImpl(int presentMask, int notPresentMask, boolean checkDirection, boolean toTarget)
           
 
Method Summary
 boolean matches(java.lang.Object source, java.lang.Object target, int edges, boolean toTarget)
          Tests whether the given edge matches this pattern.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FORWARD

public static final EdgePatternImpl FORWARD

TREE

public static final EdgePatternImpl TREE
Constructor Detail

EdgePatternImpl

public EdgePatternImpl(int presentMask,
                       int notPresentMask,
                       boolean checkDirection,
                       boolean toTarget)
Method Detail

matches

public boolean matches(java.lang.Object source,
                       java.lang.Object target,
                       int edges,
                       boolean toTarget)
Description copied from interface: EdgePattern
Tests whether the given edge matches this pattern.

Specified by:
matches in interface EdgePattern
Parameters:
source - the source node of the edge
target - the target node of the edge
edges - the edge bits of the edge
toTarget - true iff the edge is traversed from source to target
Returns:
true iff edge matches pattern