public final class ComparableTuple extends Object implements 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.
Modifier and Type | Field and Description |
---|---|
static ComparableTuple |
NIL |
Modifier and Type | Method and Description |
---|---|
int |
compareTo(ComparableTuple other) |
boolean |
equals(Object o) |
int |
hashCode() |
static ComparableTuple |
of(double number) |
static ComparableTuple |
of(List<?> values) |
static ComparableTuple |
of(long number) |
static ComparableTuple |
of(Long[] longs) |
static ComparableTuple |
of(long a,
long b) |
static ComparableTuple |
of(String string) |
static ComparableTuple |
of(String[] strings) |
static ComparableTuple |
of(String a,
long b) |
static ComparableTuple |
of(String a,
long b,
String c) |
static ComparableTuple |
of(String a,
String b) |
String |
toString() |
public static final ComparableTuple NIL
public static ComparableTuple of(long number)
public static ComparableTuple of(double number)
public static ComparableTuple of(String string)
public static ComparableTuple of(String a, String b)
public static ComparableTuple of(long a, long b)
public static ComparableTuple of(String[] strings)
public static ComparableTuple of(Long[] longs)
public static ComparableTuple of(String a, long b)
public static ComparableTuple of(String a, long b, String c)
public static ComparableTuple of(List<?> values)
public int compareTo(@NotNull ComparableTuple other)
compareTo
in interface Comparable<ComparableTuple>
Copyright © 2024 Tempo Software. All Rights Reserved.