public final class CamelCaseOrContainsInputFilter extends InsightInputFilter
| Modifier and Type | Field and Description |
|---|---|
static CamelCaseOrContainsInputFilter |
INSTANCE |
| Constructor and Description |
|---|
CamelCaseOrContainsInputFilter() |
| Modifier and Type | Method and Description |
|---|---|
ListDataItem |
findClosestDataItem(ListDataItem[] dataList, java.lang.String name)
Utility routine to find the
ListDataItem with display name, as returned by getName() that is closest to the provided name. |
java.lang.String |
findCommonPrefix(ListDataItem[] dataList, java.lang.String name)
Utility routine to find the common prefix of
ListDataItems the data list that begin with the specified name. |
ListDataItem[] |
getMatchingData(ListDataItem[] dataList, java.lang.String prefix)
Utility routine which fetches the subset of data items in this list model that starts with the given prefix specified.
|
protected void |
sortData(ListDataItem[] dataList) |
public static final CamelCaseOrContainsInputFilter INSTANCE
protected void sortData(ListDataItem[] dataList)
sortData in class InsightInputFilterpublic ListDataItem findClosestDataItem(ListDataItem[] dataList, java.lang.String name)
InsightInputFilterListDataItem with display name, as returned by getName() that is closest to the provided name. For example, suppose the user had the following items in the list:
If the passed in name is "equalsFoo()", the data item returned will be "equalsIgnoreCase()". If the passed in name is "regionMatches()", the data item returned will be "substring()".
This utility routine can be used by clients to help locate the closest data item that should be selected in an insight list so that the list tracks what the user is typing.
findClosestDataItem in class InsightInputFiltername - the display name to find the closest data item forpublic ListDataItem[] getMatchingData(ListDataItem[] dataList, java.lang.String prefix)
InsightInputFiltergetMatchingData in class InsightInputFilterprefix - the prefix to search for matching itemspublic java.lang.String findCommonPrefix(ListDataItem[] dataList, java.lang.String name)
InsightInputFilterListDataItems the data list that begin with the specified name. As with findClosestDataItem(), the name of the ListDataItem used is what is returned by getName().
If there are no items that start with the specified name, an empty (zero-length) String will be returned.
findCommonPrefix in class InsightInputFilter