V - Index data typeIterable<V>ColumnIndex, DateTimeIndex, IntIndex, StringIndexpublic class Index<V> extends Object implements Iterable<V>
| 限定符和类型 | 字段 | 说明 |
|---|---|---|
protected List<V> |
data |
|
protected DataType |
dataType |
|
protected String |
format |
|
protected String |
name |
| 构造器 | 说明 |
|---|---|
Index() |
| 限定符和类型 | 方法 | 说明 |
|---|---|---|
void |
add(int i,
V v) |
Add a value
|
void |
add(V v) |
Add a value
|
Index |
append(Index idx) |
Append another index
|
Object |
clone() |
|
boolean |
contains(V v) |
Contains function
|
static Index |
factory(List data) |
Factory method to create a new index object
|
static Index |
factory(List data,
String name) |
Factory method to create a new index object
|
static Index |
factory(Array data) |
Factory method to create a new index object
|
static Index |
factory(Array data,
String name) |
Factory method to create a new index object
|
Array |
fillKeyList(Array data,
List<Integer> rrdata) |
Fill key list
|
List<Integer> |
filterIndices(Array arr) |
Get indices
|
V |
get(int i) |
Get a value
|
List<V> |
getData() |
Get data
|
String |
getFormat() |
Get string format
|
Object[] |
getIndices(Object label) |
Get indices
|
Object[] |
getIndices(List<Object> labels) |
Get indices
|
Object[] |
getIndices_bak(List<Object> labels) |
Get indices
|
Object[] |
getIndices_s(Object label) |
Get indices
|
String |
getName() |
Get name
|
String |
getNameFormat() |
Get Name format
|
List<V> |
getValues() |
Get data
|
List<Integer> |
indexAll(Object k) |
Get all indices of an index key
|
int |
indexOf(Object v) |
Index of
|
List<Integer> |
indexOf(List<V> vs) |
Index of
|
Integer[] |
indices(Object[] names) |
Get indices
|
Integer[] |
indices(List<Object> names) |
Get indices
|
Iterator |
iterator() |
|
void |
set(int i,
V value) |
Set a value
|
void |
setData(List<V> value) |
Set data
|
void |
setFormat(String value) |
Set string format
|
void |
setName(String value) |
Set name
|
int |
size() |
Get data size
|
Index |
subIndex() |
Sub index
|
Index |
subIndex(int start,
int end,
int step) |
Sub index
|
Index |
subIndex(List<Integer> idx) |
Sub index
|
static List |
subList(List list,
List<Integer> index) |
Sub list by index
|
String |
toString() |
|
String |
toString(int idx) |
Convert i_th index to string
|
String |
toString(int idx,
String format) |
Convert i_th index to string
|
String |
toString_Index(int idx) |
Convert i_th index to string
|
void |
updateFormat() |
Update format
|
forEach, spliteratorprotected String format
protected String name
protected DataType dataType
public int size()
public String getFormat()
public String getNameFormat()
public void setFormat(String value)
value - String formatpublic String getName()
public void setName(String value)
value - Namepublic static Index factory(List data)
data - Valuespublic static Index factory(List data, String name)
data - Valuesname - Index namepublic static Index factory(Array data)
data - Valuespublic static Index factory(Array data, String name)
data - Valuesname - Index namepublic void updateFormat()
public void add(V v)
v - Valuepublic void add(int i,
V v)
i - Indexv - Valuepublic V get(int i)
i - Indexpublic void set(int i,
V value)
i - Indexvalue - Valuepublic List<Integer> indexAll(Object k)
k - The index keypublic int indexOf(Object v)
v - Valuepublic boolean contains(V v)
v - Valuepublic Index subIndex()
public Index subIndex(int start, int end, int step)
start - Start indexend - End indexstep - Steppublic Object[] getIndices(List<Object> labels)
labels - Labelspublic List<Integer> filterIndices(Array arr)
arr - Boolean arraypublic Object[] getIndices_bak(List<Object> labels)
labels - Labelspublic static List subList(List list, List<Integer> index)
list - The listindex - The indexpublic Array fillKeyList(Array data, List<Integer> rrdata)
data - Valid data arrayrrdata - Result data flagspublic String toString_Index(int idx)
idx - Index ipublic String toString(int idx)
idx - Index ipublic String toString(int idx, String format)
idx - Index iformat - Format stringCopyright © 2019. All rights reserved.