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:
  • Constructor Details

    • ComparablePair

      public ComparablePair(A a, B b)
      Creates a new comparable pair with the given parts.
      Parameters:
      a - The first part
      b - The second part
  • Method Details