public boolean hasDifferentAncestor(Node ancestor) { T parent; parent = getParent(); if (parent == null) { return false; } else { return parent.hasAncestor(ancestor); } }
/** * Returns a String representation suitable for messages. * * CAUTION: don't use to convert to a string, use instead. */ @Override public String toString() { Node working; working = getWorld().getWorking(); if (working == null || !getRoot().equals(working.getRoot())) { return getUri().toString(); } else { if (hasAncestor(working)) { return getRelative(working); } else { return Filesystem.SEPARATOR_STRING + getPath(); } } }