Class ComparablePair<A extends Comparable<A>,B extends Comparable<B>>
java.lang.Object
org.antlr.v4.runtime.misc.Pair<A,B>
io.github.douira.glsl_transformer.util.ComparablePair<A,B>
- All Implemented Interfaces:
Serializable,Comparable<ComparablePair<A,B>>
public class ComparablePair<A extends Comparable<A>,B extends Comparable<B>>
extends Pair<A,B>
implements Comparable<ComparablePair<A,B>>
The comparable pair can be compared to another comparable pair. They are
compared by first looking at any difference in A and then any difference in
B. This means the comparison behaves lexicographically. Both components are
expected to not be null.
- See Also:
-
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionComparablePair(A a, B b) Creates a new comparable pair with the given parts. -
Method Summary
-
Constructor Details
-
ComparablePair
Creates a new comparable pair with the given parts.- Parameters:
a- The first partb- The second part
-
-
Method Details
-
compareTo
- Specified by:
compareToin interfaceComparable<A extends Comparable<A>>
-