Class TreeUtils


  • public final class TreeUtils
    extends java.lang.Object
    Provides useful functionalities for zk trees, especially for searching within treenodes.
    • 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.
      • 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.
      • isEligibleForMatching

        public static boolean isEligibleForMatching​(NavigationNode node)
        Checks whether specified node is eligible for TreeUtils.FilteredTreeModel to filter. Method does not check filtering itself, yet whether filter can even be applied on node.
        Parameters:
        node - node to be checked
        Returns:
        true if node can potentially be tested against filter query
      • getDynamicNodeDepth

        protected static int getDynamicNodeDepth​(DynamicNode node)