public class Row extends Object implements IRow
| 构造器和说明 |
|---|
Row(PrimaryKey primaryKey,
Column[] columns)
Constructor.
|
Row(PrimaryKey primaryKey,
Column[] columns,
boolean needSortColumns) |
Row(PrimaryKey primaryKey,
List<Column> columns)
Constructor.
|
Row(PrimaryKey primaryKey,
List<Column> columns,
boolean needSortColumns)
Constructor.
|
| 限定符和类型 | 方法和说明 |
|---|---|
int |
compareTo(IRow o) |
boolean |
contains(String name)
Check if there is a property column with this name in this row.
|
List<Column> |
getColumn(String name)
Get all version values of a specific attribute column with a given name.
|
Column[] |
getColumns()
Get all attribute columns.
|
NavigableMap<String,NavigableMap<Long,ColumnValue>> |
getColumnsMap()
Returns a Map containing all attribute columns.
|
Column |
getLatestColumn(String name)
Get the value of the latest version in this attribute column.
|
PrimaryKey |
getPrimaryKey() |
boolean |
isEmpty()
Check if the row contains any attribute columns.
|
String |
toString() |
public Row(PrimaryKey primaryKey, List<Column> columns)
primaryKey - The primary key of the row, must not be null or emptycolumns - The attribute columns of this row, must not be nullpublic Row(PrimaryKey primaryKey, List<Column> columns, boolean needSortColumns)
primaryKey - The primary key of the row, cannot be null or emptycolumns - The attribute columns of this row, cannot be nullneedSortColumns - Whether the attribute columns need to be sortedpublic Row(PrimaryKey primaryKey, Column[] columns)
primaryKey - The primary key of the row, cannot be null or emptycolumns - The attribute columns of this row, cannot be nullpublic Row(PrimaryKey primaryKey, Column[] columns, boolean needSortColumns)
public PrimaryKey getPrimaryKey()
getPrimaryKey 在接口中 IRowpublic Column[] getColumns()
All attribute columns in the array are sorted in ascending order by name, and attribute columns with the same name are sorted in descending order by timestamp.
public List<Column> getColumn(String name)
The returned results will list these attribute columns in descending order by timestamp.
name - the name of the attribute columnpublic Column getLatestColumn(String name)
name - the name of the attribute columnpublic boolean contains(String name)
name - The name of the property columnpublic boolean isEmpty()
public NavigableMap<String,NavigableMap<Long,ColumnValue>> getColumnsMap()
This Map is a two-level Map, the first level maps attribute column names to all versioned attribute columns, and the second level maps timestamps to attribute columns.
Attribute column names are sorted in ascending order in the Map, while attribute column timestamps are sorted in descending order.
public int compareTo(IRow o)
compareTo 在接口中 Comparable<IRow>Copyright © 2025. All Rights Reserved.