public class TimeSpanComparator extends Object implements Comparator<ITimeSpan>
Comparator that is capable of comparing two time spans
with each other. This class comes in handy when tryin to sort collections of
time spans.Collections.sort(java.util.List, Comparator)| Constructor and Description |
|---|
TimeSpanComparator() |
| Modifier and Type | Method and Description |
|---|---|
int |
compare(ITimeSpan span1,
ITimeSpan span2)
Compares two time spans with each other.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcomparing, comparing, comparingDouble, comparingInt, comparingLong, equals, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLongpublic int compare(ITimeSpan span1, ITimeSpan span2)
Comparable.compareTo(Object) on the first time span passing in
the second span as an argument.compare in interface Comparator<ITimeSpan>span1 - the first span to comparespan2 - the second span to compareComparator.compare(java.lang.Object, java.lang.Object)Copyright © 2006–2020 Dirk Lemmermann Software & Consulting. All rights reserved.