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 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