Package de.hybris.platform.cockpit.util
Class TreeUtils
- java.lang.Object
-
- de.hybris.platform.cockpit.util.TreeUtils
-
public 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.FilteredTreeModelSubclass ofAbstractTreeModelthat can be used as a filter.static interfaceTreeUtils.FilterStringResolverUsed byTreeUtils.FilteredTreeModelto determine the string representation of a treenode that should be used for filtering.static classTreeUtils.TreeState<T>This class can be used to store the state of a tree regarding expanded/collapsed nodes.
-
Constructor Summary
Constructors Constructor Description TreeUtils()
-
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)Checks, if argument data can be represented by argument filterString, i.e.static booleanmatchFilterStringSimple(java.lang.String value, java.lang.String filterString)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 "camelcased" search string.- Returns:
- true, if the search string is a camelcase representation of the value.
-
matchFilterStringSimple
public static boolean matchFilterStringSimple(java.lang.String value, java.lang.String filterString)Checks, if argument value starts (case-insensitive) with argument filterString.
-
matchFilterString
public static boolean matchFilterString(java.lang.Object data, java.lang.String filterString, boolean camelCase)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.
-
-