Class CLI_Comparator<T extends ChordLeadSheetItem<?>>
java.lang.Object
org.jjazz.chordleadsheet.api.item.CLI_Comparator<T>
- All Implemented Interfaces:
Comparator<T>
public class CLI_Comparator<T extends ChordLeadSheetItem<?>>
extends Object
implements Comparator<T>
A Comparator which uses Position then PositionOrder to order ChordLeadSheetItems.
Conditions to return the 0 value can be adjusted at construction.
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Comparator
equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
Constructor Details
-
CLI_Comparator
public CLI_Comparator(boolean useZeroForEquals) - Parameters:
useZeroForEquals- It true, returns 0 only when cli1.equals(cli2), otherwise only when cli1 == cli2.
-
-
Method Details
-
compare
- Specified by:
comparein interfaceComparator<T extends ChordLeadSheetItem<?>>
-