我将RowFilter.regexFilter(...)
应用于我的表格,并且Integer
列上的过滤功能无法正常工作。我认为在RowFilter.RegexFilter.include()
中,要评估的Integer
值用逗号转换为String
。RowFilter RegexFilter - 如何避免整数被逗号转换为字符串?
18 -> 18
4820 -> 4,820
85898 -> 85,898
不过,我想这是一个普通的Integer
-STRING没有任何逗号。 我设置的RowFilter我的表是这样的:
String myfilterString = "^\Q46\E"; // integer value should start with "46"
RowFilter<Object, Object> patternFilter = RowFilter.regexFilter("(?i)" + myFilterString, columnIndex);
myTable.setRowFilter(patternFilter);
我怎样才能改变这里的行为?
请显示这样的代码 – ItamarG3
这是很多代码,我将添加我在一分钟内为表设置RowFilter的部分。 – sfandler
你可以只是把字符串“展示”之前更改格式(如我的回答解释)(我不清楚究竟对你怎么说到做到这一点) – ItamarG3