story.scheherazade.nodes
Class StateNodeComparator
java.lang.Object
story.scheherazade.nodes.StateNodeComparator
- All Implemented Interfaces:
- java.util.Comparator
public class StateNodeComparator
- extends java.lang.Object
- implements java.util.Comparator
An implementation of the Comparator interface that allows
comparisons between two State nodes (or, more precisely,
NodeAddresses) so that other classes can sort States by time.
Method Summary |
int |
compare(java.lang.Object o1,
java.lang.Object o2)
Compare two State NodeAddresses. |
boolean |
equals(java.lang.Object obj)
Determines if this Comparator is equivalent to
some other Comparator. |
Methods inherited from class java.lang.Object |
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
StateNodeComparator
public StateNodeComparator(DBCAccessor dbca)
compare
public int compare(java.lang.Object o1,
java.lang.Object o2)
throws java.lang.ClassCastException
- Compare two State NodeAddresses. Runs
compare over the two "time" attributes.
- Specified by:
compare
in interface java.util.Comparator
- Throws:
java.lang.ClassCastException
equals
public boolean equals(java.lang.Object obj)
- Determines if this Comparator is equivalent to
some other Comparator.
- Specified by:
equals
in interface java.util.Comparator
- Overrides:
equals
in class java.lang.Object
Copyright © 2011 David K. Elson. All Rights Reserved.