Class ComparableTuple
Object
ComparableTuple
- All Implemented Interfaces:
Comparable<ComparableTuple>
Comparable tuple is a tuple consisting of numbers and strings, which is compared on per-component order, starting with the first element (most significant), down to the last one. It works similar to the string comparison by character.
Each pair of elements are compared based on their types. Elements of the same types are compared using their standard comparison method. If elements have different types, the numbers come before the strings.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionintcompareTo(ComparableTuple other) booleaninthashCode()static ComparableTupleof(double number) static ComparableTupleof(long number) static ComparableTupleof(long a, long b) static ComparableTuplestatic ComparableTuplestatic ComparableTuplestatic ComparableTuplestatic ComparableTuplestatic ComparableTuplestatic ComparableTupletoString()
-
Field Details
-
NIL
-
-
Method Details
-
of
-
of
-
of
-
of
-
of
-
of
-
of
-
of
-
of
-
of
-
compareTo
- Specified by:
compareToin interfaceComparable<ComparableTuple>
-
equals
-
hashCode
public int hashCode() -
toString
-