Class 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 most MAX_NAME_LENGTH.
    See Also:
    Value, Bytes, Serialized Form
    • Field Detail

      • 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 interface java.lang.Comparable<Cell>
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object