public abstract class AbstractOnHeapClusteringPrefix<V> extends java.lang.Object implements ClusteringPrefix<V>
ClusteringPrefix.Deserializer, ClusteringPrefix.Kind, ClusteringPrefix.Serializer
Modifier and Type | Field and Description |
---|---|
protected ClusteringPrefix.Kind |
kind |
protected V[] |
values |
serializer
Constructor and Description |
---|
AbstractOnHeapClusteringPrefix(ClusteringPrefix.Kind kind,
V[] values) |
Modifier and Type | Method and Description |
---|---|
ClusteringPrefix<V> |
clustering() |
boolean |
equals(java.lang.Object o) |
V |
get(int i)
Retrieves the ith value of this prefix.
|
V[] |
getRawValues()
The values of this prefix as an array.
|
int |
hashCode() |
ClusteringPrefix.Kind |
kind() |
int |
size()
The number of values in this prefix.
|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
accessor, bufferAt, dataSize, digest, equals, equals, getBufferArray, hashCode, isBottom, isEmpty, isTop, minimize, serializeAsPartitionKey, stringAt, toString, validate
unsharedHeapSize
protected final ClusteringPrefix.Kind kind
protected final V[] values
public AbstractOnHeapClusteringPrefix(ClusteringPrefix.Kind kind, V[] values)
public ClusteringPrefix.Kind kind()
kind
in interface ClusteringPrefix<V>
public ClusteringPrefix<V> clustering()
clustering
in interface Clusterable<V>
public int size()
ClusteringPrefix
size
in interface ClusteringPrefix<V>
public V get(int i)
ClusteringPrefix
get
in interface ClusteringPrefix<V>
i
- the index of the value to retrieve. Must be such that 0 <= i < size()
.null
.public V[] getRawValues()
ClusteringPrefix
Please note that this may or may not require an array creation. So 1) you should *not*
modify the returned array and 2) it's more efficient to use ClusteringPrefix.size()
and
ClusteringPrefix.get(int)
unless you actually need an array.
getRawValues
in interface ClusteringPrefix<V>
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
Copyright © 2009-2022 The Apache Software Foundation