Package ch.njol.skript.classes
Interface Comparator<T1,T2>
- Type Parameters:
T1
- ,T2
- the types to compare
- All Known Implementing Classes:
InverseComparator
public interface Comparator<T1,T2>
Used to compare two objects of a different or the same type.
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic class
holds information about a comparator.static class
represents a relation between two objects. -
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionCompares the given objects which may not be null.boolean
-
Field Details
-
equalsComparator
-
-
Method Details
-
compare
Compares the given objects which may not be null. Returning GREATER/SMALLER means that the first parameter is greater/smaller.- Parameters:
o1
- Non-null objecto2
- Non-null object- Returns:
- the relation of the objects. Should neither return GREATER_OR_EQUAL nor SMALLER_OR_EQUAL.
-
supportsOrdering
boolean supportsOrdering()- Returns:
- whether this comparator supports ordering of elements or not.
-