edu.umd.cs.findbugs.graph
Class VisitationTimeComparator<VertexType extends GraphVertex<VertexType>>
java.lang.Object
edu.umd.cs.findbugs.graph.VisitationTimeComparator<VertexType>
- All Implemented Interfaces:
- java.io.Serializable, java.util.Comparator<VertexType>
public class VisitationTimeComparator<VertexType extends GraphVertex<VertexType>>
- extends java.lang.Object
- implements java.util.Comparator<VertexType>, java.io.Serializable
Comparator to compare GraphVertex objects by their visitation times in a
search; for example, it could compare the finishing times produced
by DepthFirstSearch.
- See Also:
- Serialized Form
Field Summary |
static int |
ASCENDING
Compare in ascending order. |
static int |
DESCENDING
Compare in descending order. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface java.util.Comparator |
equals |
ASCENDING
public static final int ASCENDING
- Compare in ascending order.
- See Also:
- Constant Field Values
DESCENDING
public static final int DESCENDING
- Compare in descending order.
- See Also:
- Constant Field Values
VisitationTimeComparator
public VisitationTimeComparator(int[] visitationTimeList,
int direction)
- Constructor.
- Parameters:
visitationTimeList
- array of visitation times indexed by vertex labeldirection
- either ASCENDING or DESCENDING
compare
public int compare(VertexType v1,
VertexType v2)
- Specified by:
compare
in interface java.util.Comparator<VertexType extends GraphVertex<VertexType>>
FindBugs™ is licenced under the LGPL. Copyright © 2006 University of Maryland.