cgl.narada.matching.tagvaluepairs
Class TagValueMatchingTreeEdge

java.lang.Object
  extended by cgl.narada.matching.tagvaluepairs.TagValueMatchingTreeEdge
All Implemented Interfaces:
TagValueMatchingDebugFlags

public class TagValueMatchingTreeEdge
extends Object
implements TagValueMatchingDebugFlags

This class implements the matching tree edge, which could be connected to some other tag node or could be a pure destination edge. TagValueMatchingTreeEdge.java


Field Summary
 
Fields inherited from interface cgl.narada.matching.tagvaluepairs.TagValueMatchingDebugFlags
TagValueClientEdgeAttributes_Debug, TagValueClientMatching_Debug, TagValueClientMatchingTreeEdge_Debug, TagValueClientMatchingTreeNode_Debug, TagValueClientProfile_Debug, TagValueEdgeAttributes_Debug, TagValueEvent_Debug, TagValueMatching_Debug, TagValueMatchingTreeEdge_Debug, TagValueMatchingTreeNode_Debug, TagValueProfile_Debug
 
Constructor Summary
TagValueMatchingTreeEdge(String value, int destination)
          This constructor creates an edge that is a pure destination edge, providing destinations during the matching process.
TagValueMatchingTreeEdge(String value, TagValueMatchingTreeNode leadsIntoNode, int destination)
          This constructor creates an edge that leads into a certain node.
 
Method Summary
 void addDestinationsToEdge(int _destination)
          This method adds destinations to an edge.
 void addNodeToEdge(TagValueMatchingTreeNode leadsIntoNode)
          This method adds a node to a certain edge.
 boolean equals(Object obj)
          Compares two objects for equality.
 int getDestinations()
          Returns the destinations that are associated with the edge.
 TagValueMatchingTreeNode getLeadingIntoNode()
          Returns the Tag node that this node leads into
 int[] getPredicateCountForDestinations()
          Returns the predicate count associated with the destinations
 String getValue()
          Returns value associated with the specific edge.
 int hashCode()
          Generates a hash code for the receiver.
 boolean leadsIntoNode()
          Provides an indication if this node leads into another tag node.
static void main(String[] args)
           
 boolean providesDestinations()
          Indicates if this edge is a pure destination edge, providing final destinations for a matched event.
 void removeDestinationsFromEdge(int _destination)
          This method removes destinations from an edge.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TagValueMatchingTreeEdge

public TagValueMatchingTreeEdge(String value,
                                TagValueMatchingTreeNode leadsIntoNode,
                                int destination)
This constructor creates an edge that leads into a certain node.

Parameters:
value - The value that this edge takes.
leadsIntoNode - The node that this edge leads into.
destination - The destination associated with this edge

TagValueMatchingTreeEdge

public TagValueMatchingTreeEdge(String value,
                                int destination)
This constructor creates an edge that is a pure destination edge, providing destinations during the matching process.

Parameters:
value - The value that this edge takes.
destination - The destination associated with this edge
Method Detail

leadsIntoNode

public boolean leadsIntoNode()
Provides an indication if this node leads into another tag node.

Returns:
true If it does lead into another node.

providesDestinations

public boolean providesDestinations()
Indicates if this edge is a pure destination edge, providing final destinations for a matched event.

Returns:
true If this edge is a pure destination edge.

getDestinations

public int getDestinations()
Returns the destinations that are associated with the edge.

Returns:
Destinations associated with the edge.

getPredicateCountForDestinations

public int[] getPredicateCountForDestinations()
Returns the predicate count associated with the destinations

Returns:
The predicate count associated with individual destinations.

addDestinationsToEdge

public void addDestinationsToEdge(int _destination)
This method adds destinations to an edge. This occurs during reuse of either a pure destination edge or an edge connecting two tags.

Parameters:
_destination - The destination associated with the edge in question.

removeDestinationsFromEdge

public void removeDestinationsFromEdge(int _destination)
This method removes destinations from an edge.

Parameters:
_destination - The destination associated with the edge in question.

addNodeToEdge

public void addNodeToEdge(TagValueMatchingTreeNode leadsIntoNode)
This method adds a node to a certain edge.

Parameters:
leadsIntoNode - The node that this edge leads into

getValue

public String getValue()
Returns value associated with the specific edge. Useful in the equals method for the edge


getLeadingIntoNode

public TagValueMatchingTreeNode getLeadingIntoNode()
Returns the Tag node that this node leads into


equals

public boolean equals(Object obj)
Compares two objects for equality. Returns a boolean that indicates whether this object is equivalent to the specified object. This method is used when an object is stored in a hashtable.

Overrides:
equals in class Object
Parameters:
obj - the Object to compare with
Returns:
true if these Objects are equal; false otherwise.
See Also:
Hashtable

hashCode

public int hashCode()
Generates a hash code for the receiver. This method is supported primarily for hash tables, such as those provided in java.util. If two objects are equal (equals(Object) returns true) they must have the same hash code

Overrides:
hashCode in class Object
Returns:
an integer hash code for the receiver

main

public static void main(String[] args)


For comments and suggestions please send e-mail to The NaradaBrokering Project