@Override
  public JimfsPath normalize() {
    if (isNormal()) {
      return this;
    }

    Deque<Name> newNames = new ArrayDeque<>();
    for (Name name : names) {
      if (name.equals(Name.PARENT)) {
        Name lastName = newNames.peekLast();
        if (lastName != null && !lastName.equals(Name.PARENT)) {
          newNames.removeLast();
        } else if (!isAbsolute()) {
          // if there's a root and we have an extra ".." that would go up above the root, ignore it
          newNames.add(name);
        }
      } else if (!name.equals(Name.SELF)) {
        newNames.add(name);
      }
    }

    return Iterables.elementsEqual(newNames, names) ? this : pathService.createPath(root, newNames);
  }
Returns true if list starts with all elements of other in the same order.
jimfs/src/main/java/com/google/common/jimfs/JimfsPath.java