Package org.apache.cassandra.db.virtual
Class AbstractMutableVirtualTable.ColumnValues
- java.lang.Object
-
- org.apache.cassandra.db.virtual.AbstractMutableVirtualTable.ColumnValues
-
- All Implemented Interfaces:
java.lang.Comparable<AbstractMutableVirtualTable.ColumnValues>
- Enclosing class:
- AbstractMutableVirtualTable
public static final class AbstractMutableVirtualTable.ColumnValues extends java.lang.Object implements java.lang.Comparable<AbstractMutableVirtualTable.ColumnValues>
A set of partition key or clustering column values.
-
-
Constructor Summary
Constructors Constructor Description ColumnValues(java.util.List<ColumnMetadata> metadata, java.lang.Object... values)
Create aColumnValues
for the specified set of columns.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compareTo(AbstractMutableVirtualTable.ColumnValues o)
static AbstractMutableVirtualTable.ColumnValues
from(TableMetadata metadata, ClusteringPrefix<?> prefix)
Returns the set of column values corresponding to the specified clustering prefix.static AbstractMutableVirtualTable.ColumnValues
from(TableMetadata metadata, DecoratedKey partitionKey)
Returns the set of column values corresponding to the specified partition key.java.lang.String
name(int i)
Returns the name of the specified columnint
size()
Returns the number of column values.java.lang.String
toString()
<V> V
value(int i)
Returns the value for the specified column
-
-
-
Constructor Detail
-
ColumnValues
public ColumnValues(java.util.List<ColumnMetadata> metadata, java.lang.Object... values)
Create aColumnValues
for the specified set of columns.- Parameters:
metadata
- the partition or clustering columns metadatavalues
- the partition or clustering column values
-
-
Method Detail
-
from
public static AbstractMutableVirtualTable.ColumnValues from(TableMetadata metadata, DecoratedKey partitionKey)
Returns the set of column values corresponding to the specified partition key.- Parameters:
metadata
- the table metadatapartitionKey
- the partition key- Returns:
- the set of columns values corresponding to the specified partition key
-
from
public static AbstractMutableVirtualTable.ColumnValues from(TableMetadata metadata, ClusteringPrefix<?> prefix)
Returns the set of column values corresponding to the specified clustering prefix.- Parameters:
metadata
- the table metadataprefix
- the clustering prefix- Returns:
- the set of columns values corresponding to the specified clustering prefix
-
name
public java.lang.String name(int i)
Returns the name of the specified column- Parameters:
i
- the column index- Returns:
- the column name
-
value
public <V> V value(int i)
Returns the value for the specified column- Parameters:
i
- the column index- Returns:
- the column value
-
size
public int size()
Returns the number of column values.- Returns:
- the number of column values.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
compareTo
public int compareTo(AbstractMutableVirtualTable.ColumnValues o)
- Specified by:
compareTo
in interfacejava.lang.Comparable<AbstractMutableVirtualTable.ColumnValues>
-
-