Class TreeElementNameComparator

java.lang.Object
org.javarosa.core.model.instance.utils.TreeElementNameComparator

public class TreeElementNameComparator
extends Object
Supports locating TreeElements by name.
  • Constructor Details

  • Method Details

    • elementMatchesName

      public static boolean elementMatchesName​(TreeElement treeElement, String name)
      Determines whether treeElement matches name. If name is a wildcard, it does. If the element’s name matches name (using equals), it does. If neither of those cases are true, a namespace prefix for treeElement, if one can be located, is prepended to treeElement’s name, and that is compared to name with equals.
      Parameters:
      treeElement - the TreeElement under examination
      name - the name to be compared with treeElement’s name
      Returns:
      whether treeElement matches name