A collection of Comparators suitable for use with Option instances.
chain
public static Comparator chain(Comparator c0,
Comparator c1)
Chains comparators together.
c0
- a comparatorc1
- a comparator
chain
public static Comparator chain(Comparator c0,
Comparator c1,
Comparator c2)
Chains comparators together.
c0
- a comparatorc1
- a comparatorc2
- a comparator
chain
public static Comparator chain(Comparator c0,
Comparator c1,
Comparator c2,
Comparator c3)
Chains comparators together.
c0
- a comparatorc1
- a comparatorc2
- a comparatorc3
- a comparator
chain
public static Comparator chain(Comparator c0,
Comparator c1,
Comparator c2,
Comparator c3,
Comparator c4)
Chains comparators together.
c0
- a comparatorc1
- a comparatorc2
- a comparatorc3
- a comparatorc4
- a comparator
chain
public static Comparator chain(Comparator[] comparators)
Chains an array of comparators together. Each Comparator will be called
in turn until one of them return a non-zero value, this value will be
returned.
comparators
- the array of comparators
chain
public static Comparator chain(List comparators)
Chains comparators together.
comparators
- a List of comparators to chain together
commandFirst
public static Comparator commandFirst()
Forces Command instances to appear at the beginning of lists
commandLast
public static Comparator commandLast()
Forces Command instances to appear at the end of lists
defaultOptionFirst
public static Comparator defaultOptionFirst()
Forces DefaultOption instances to appear at the beginning of lists
defaultOptionLast
public static Comparator defaultOptionLast()
Forces DefaultOption instances to appear at the end of lists
groupFirst
public static Comparator groupFirst()
Forces Group instances to appear at the beginning of lists
groupLast
public static Comparator groupLast()
Forces Group instances to appear at the end of lists
namedFirst
public static Comparator namedFirst(String name)
Forces Comparators with a particular trigger to appear at the beginning
of lists
name
- the trigger name to select
namedLast
public static Comparator namedLast(String name)
Forces Comparators with a particular trigger to appear at the end of
lists
name
- the trigger name to select
preferredNameFirst
public static Comparator preferredNameFirst()
Orders Options by preferredName
preferredNameLast
public static Comparator preferredNameLast()
Orders Options by preferredName, reversed
requiredFirst
public static Comparator requiredFirst()
Orders Options grouping required Options first
requiredLast
public static Comparator requiredLast()
Orders Options grouping required Options last
switchFirst
public static Comparator switchFirst()
Forces Switch instances to appear at the beginning of lists
switchLast
public static Comparator switchLast()
Forces Switch instances to appear at the end of lists