Modifier and Type | Class and Description |
---|---|
static class |
Key.Evaluated.NullStandin
Values used in index keys in place of missing fields.
|
Modifier and Type | Field and Description |
---|---|
static Key.Evaluated |
EMPTY
A key containing no elements.
|
static Key.Evaluated |
NULL
A key containing just the null element.
|
Modifier and Type | Method and Description |
---|---|
Key.Evaluated |
append(Key.Evaluated secondValue)
Creates a new key by appending another key to this one.
|
static Key.Evaluated |
concatenate(List<Object> values)
Take a list of scalars and concatenate them in a single key.
|
static Key.Evaluated |
concatenate(Object first,
Object... rest)
Primarily for tests, shorthand for creating a concatenation with a bunch of elements, see concatenate.
|
boolean |
containsNonUniqueNull()
Check for NULL value that inhibits unique indexes.
|
boolean |
equals(Object o) |
static List<Key.Evaluated> |
fan(List<Object> valuesToAdd)
Fanout a list of scalars into a key for each value.
|
static Key.Evaluated |
fromTuple(Tuple tuple)
Take a
Tuple and create the corresponding
key from it. |
double |
getDouble(int idx) |
float |
getFloat(int idx) |
long |
getLong(int idx) |
Double |
getNullableDouble(int idx) |
Float |
getNullableFloat(int idx) |
Long |
getNullableLong(int idx) |
Object |
getObject(int idx) |
<T> T |
getObject(int idx,
Class<T> clazz) |
String |
getString(int idx) |
int |
hashCode() |
static Key.Evaluated |
scalar(Object object)
Creates a new key with just a single value.
|
int |
size() |
Key.Evaluated |
subKey(int start,
int end) |
List<Object> |
toList()
Converts to a list.
|
String |
toString() |
Tuple |
toTuple()
Convert this key to the corresponding
Tuple that can then be serialized
into the database. |
List<Object> |
toTupleAppropriateList()
Converts to a list.
|
List<Object> |
values() |
public static final Key.Evaluated EMPTY
public static final Key.Evaluated NULL
@Nonnull public static Key.Evaluated scalar(@Nullable Object object)
object
- the lone value in the key@Nonnull public static List<Key.Evaluated> fan(@Nonnull List<Object> valuesToAdd)
valuesToAdd
- the list of scalars@Nonnull public static Key.Evaluated concatenate(@Nonnull List<Object> values)
values
- the values to combine together into a key@Nonnull public static Key.Evaluated concatenate(@Nullable Object first, @Nullable Object... rest)
first
- the first value to be concatenated, avoids type conflicts with the other concatenaterest
- the rest of the values@Nonnull public static Key.Evaluated fromTuple(@Nonnull Tuple tuple)
Tuple
and create the corresponding
key from it.tuple
- the tuple to convert@Nonnull public Tuple toTuple()
Tuple
that can then be serialized
into the database.Tuple
public long getLong(int idx)
public double getDouble(int idx)
public float getFloat(int idx)
@Nonnull public Key.Evaluated append(@Nonnull Key.Evaluated secondValue)
secondValue
- another key that will form the second part of the new key.@Nonnull public List<Object> toList()
@Nonnull public List<Object> toTupleAppropriateList()
public boolean containsNonUniqueNull()
true
if this has a null valuepublic int size()
public Key.Evaluated subKey(int start, int end)