M
-模型的类型;例如
PersonModel
I
-标识符的类型;当使用
TableRowSorter
这将
Integer
public abstract static class RowFilter.Entry<M,I> extends Object
Entry
对象传递给
RowFilter
实例,使滤波器得到的输入数据的值,从而确定输入是否应显示。一个
Entry
对象包含有关模型的信息,以及从模型获取的潜在价值的方法。
RowFilter
,
DefaultRowSorter.setRowFilter(javax.swing.RowFilter)
Constructor and Description |
---|
Entry()
创建一个
Entry 。
|
Modifier and Type | Method and Description |
---|---|
abstract I |
getIdentifier()
返回的标识符(模型)的入口。
|
abstract M |
getModel()
返回底层模型。
|
String |
getStringValue(int index)
返回指定索引处的字符串值。
|
abstract Object |
getValue(int index)
返回指定索引处的值。
|
abstract int |
getValueCount()
返回条目中的值的数目。
|
public abstract M getModel()
public abstract int getValueCount()
public abstract Object getValue(int index)
null
。当使用一个表时,索引对应模型中的列数。
index
-价值获取指标
IndexOutOfBoundsException
如果指数<0或>=getvaluecount
public String getStringValue(int index)
String
值这是首选方法,
getValue
作为
getValue(index).toString()
可能返回不同的结果比
getStringValue(index)
。
这要求执行getValue(index).toString()
核对后null
。子类,提供不同的字符串转换应重写此方法,如果有必要的话。
index
-价值获取指标
non-null
字符串中的指定索引处
IndexOutOfBoundsException
如果指数小于0 | | > = getvaluecount
public abstract I getIdentifier()
Integer
。
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.