Class Cell
- java.lang.Object
-
- com.palantir.atlasdb.keyvalue.api.Cell
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<Cell>
public final class Cell extends java.lang.Object implements java.io.Serializable, java.lang.Comparable<Cell>
Represents a cell in the key-value store. A cell consists of a non-empty row and column name that each individually have length at mostMAX_NAME_LENGTH
.- See Also:
Value
,Bytes
, Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static java.util.Comparator<Cell>
COLUMN_COMPARATOR
static int
MAX_NAME_LENGTH
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compareTo(Cell other)
static Cell
create(byte[] rowName, byte[] columnName)
Creates a key.boolean
equals(java.lang.Object obj)
byte[]
getColumnName()
The name of the column within the row.byte[]
getRowName()
The name of the row within the table.int
hashCode()
static boolean
isNameValid(byte[] name)
java.lang.String
toString()
-
-
-
Field Detail
-
MAX_NAME_LENGTH
public static final int MAX_NAME_LENGTH
- See Also:
- Constant Field Values
-
COLUMN_COMPARATOR
public static final java.util.Comparator<Cell> COLUMN_COMPARATOR
-
-
Method Detail
-
create
public static Cell create(byte[] rowName, byte[] columnName)
Creates a key. Do not modify the rowName or the columnName arrays after passing them. This doesn't make a copy for performance reasons.
-
isNameValid
public static boolean isNameValid(byte[] name)
-
getRowName
@Nonnull public byte[] getRowName()
The name of the row within the table.
-
getColumnName
@Nonnull public byte[] getColumnName()
The name of the column within the row.
-
compareTo
public int compareTo(Cell other)
- Specified by:
compareTo
in interfacejava.lang.Comparable<Cell>
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-