Beispiel #1
0
 /**
  * Returns true if the given node is equivalent to this node. Two nodes are equivalent only if
  * they have the same word, the same number of entering and leaving edges, and that their begin
  * and end times are the same.
  *
  * @param other the Node we're comparing to
  * @return true if the Node is equivalent; false otherwise
  */
 public boolean isEquivalent(Node other) {
   return ((word.getSpelling().equals(other.getWord().getSpelling())
           && (getEnteringEdges().size() == other.getEnteringEdges().size()
               && getLeavingEdges().size() == other.getLeavingEdges().size()))
       && (getBeginTime() == other.getBeginTime() && endTime == other.getEndTime()));
 }