code: protected boolean compareNodeNames(String nodePathElement, String nodeName) {
          boolean comparisonResult = false;
  
          switch (mSelectorIdentifier) {
              case SELECT_BY_REGEX:
                  comparisonResult = Pattern.matches(nodePathElement, nodeName);
                  break;
  
              case SELECT_BY_STRING:
              default:
                  comparisonResult = nodePathElement.equals(nodeName);
                  break;
          }
  
          return comparisonResult;
      }
docs: Compare a node path element (provided as argument of the selectNode method) to a node name (from a JTree).
  
  @param nodePathElement the node path element to compare with the node name
  @param nodeName the node name
  @return true if both match, false otherwise.