public class Row extends Object implements IRow
构造器和说明 |
---|
Row(PrimaryKey primaryKey,
Column[] columns)
构造函数。
|
Row(PrimaryKey primaryKey,
List<Column> columns)
构造函数。
|
限定符和类型 | 方法和说明 |
---|---|
int |
compareTo(IRow o) |
boolean |
contains(String name)
检查该行中是否有该名称的属性列。
|
List<Column> |
getColumn(String name)
获取某个特定名称的属性列的所有版本的值。
|
Column[] |
getColumns()
获取所有的属性列。
|
NavigableMap<String,NavigableMap<Long,ColumnValue>> |
getColumnsMap()
返回一个包含所有属性列的Map。
|
Column |
getLatestColumn(String name)
获取该属性列中最新版本的值。
|
PrimaryKey |
getPrimaryKey() |
boolean |
isEmpty()
检查该行是否包含属性列。
|
String |
toString() |
public Row(PrimaryKey primaryKey, List<Column> columns)
primaryKey
- 行的主键,不能为null或者为空columns
- 该行的属性列,不能为nullpublic Row(PrimaryKey primaryKey, Column[] columns)
primaryKey
- 行的主键,不能为null或者为空columns
- 该行的属性列,不能为nullpublic PrimaryKey getPrimaryKey()
getPrimaryKey
在接口中 IRow
public Column[] getColumns()
数组中的所有属性列按名称升序排列,相同名称的属性列按timestamp降序排列。
public List<Column> getColumn(String name)
返回结果中这些属性列按timestamp降序排列。
name
- 属性列的名称public Column getLatestColumn(String name)
name
- 属性列的名称public boolean contains(String name)
name
- 属性列的名称public boolean isEmpty()
public NavigableMap<String,NavigableMap<Long,ColumnValue>> getColumnsMap()
该Map为一个双层Map,第一层为属性列名称到所有版本属性列的映射,第二层为时间戳与属性列的映射。
属性列名称在Map中升序排列,属性列时间戳降序排列。
public int compareTo(IRow o)
compareTo
在接口中 Comparable<IRow>
Copyright © 2018. All Rights Reserved.