Package com.hybris.cockpitng.tree.util
Class TreeUtils
- java.lang.Object
-
- com.hybris.cockpitng.tree.util.TreeUtils
-
public final class TreeUtils extends java.lang.ObjectProvides useful functionalities for zk trees, especially for searching within treenodes.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classTreeUtils.FilteredTreeModel<E>Subclass ofAbstractTreeModelthat can be used as a filter.static interfaceTreeUtils.FilterStringResolver<E>Used byTreeUtils.FilteredTreeModelto determine the string representation of a treenode that should be used for filtering.static classTreeUtils.MatchModestatic classTreeUtils.SearchDepthDetermines whether filtering should be done up until first match or without any limitations
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static booleanmatchCamelCase(java.lang.String value, java.lang.String searchString)Camelcase string matching.static booleanmatchFilterString(java.lang.Object data, java.lang.String filterString, boolean camelCase)The call is equal to callingmatchFilterString(Object, String, boolean, MatchMode)with match mode set toTreeUtils.MatchMode.CONTAINS.static booleanmatchFilterString(java.lang.Object data, java.lang.String filterString, boolean camelCase, TreeUtils.MatchMode mode)Checks, if argument data can be represented by argument filterString, i.e.static booleanmatchFilterStringSimple(java.lang.String value, java.lang.String filterString)The call is equal to callingmatchFilterStringSimple(String, String, MatchMode)with match mode set toTreeUtils.MatchMode.CONTAINS.static booleanmatchFilterStringSimple(java.lang.String value, java.lang.String filterString, TreeUtils.MatchMode mode)Checks, if argument value starts (case-insensitive) with argument filterString.
-
-
-
Method Detail
-
matchCamelCase
public static boolean matchCamelCase(java.lang.String value, java.lang.String searchString)Camelcase string matching.- Parameters:
value- the string that should be checked.searchString- the "camel-cased" search string.- Returns:
- true, if the search string is a camelcase representation of the value.
-
matchFilterString
public static boolean matchFilterString(java.lang.Object data, java.lang.String filterString, boolean camelCase)The call is equal to callingmatchFilterString(Object, String, boolean, MatchMode)with match mode set toTreeUtils.MatchMode.CONTAINS.
-
matchFilterString
public static boolean matchFilterString(java.lang.Object data, java.lang.String filterString, boolean camelCase, TreeUtils.MatchMode mode)Checks, if argument data can be represented by argument filterString, i.e. it first checks, if data is aString, then invokesmatchFilterString(Object, String, boolean)and optionally invokesmatchCamelCase(String, String), depending on argument camelCase.
-
matchFilterStringSimple
public static boolean matchFilterStringSimple(java.lang.String value, java.lang.String filterString)The call is equal to callingmatchFilterStringSimple(String, String, MatchMode)with match mode set toTreeUtils.MatchMode.CONTAINS.
-
matchFilterStringSimple
public static boolean matchFilterStringSimple(java.lang.String value, java.lang.String filterString, TreeUtils.MatchMode mode)Checks, if argument value starts (case-insensitive) with argument filterString.
-
-