private Segment first() {
    return segments.get(0);
  }
Finds matching paths from the given base node
E.g.:
 If the pattern is /*&#47;/abc* it will find nodes like:
   /a/abcdef
   /xy/abc/efg
   /def/abc
ambari-agent/src/main/java/org/apache/ambari/tools/zk/ZkPathPattern.java