@Override public ItemPathSegment clone() { return new ObjectReferencePathSegment(); }
@Override public boolean equivalent(Object obj) { return equals(obj); }
public static ItemPathSegment createSegment(QName qname, boolean variable) { if (ParentPathSegment.QNAME.equals(qname)) { return new ParentPathSegment(); } else if (ObjectReferencePathSegment.QNAME.equals(qname)) { return new ObjectReferencePathSegment(); } else if (IdentifierPathSegment.QNAME.equals(qname)) { return new IdentifierPathSegment(); } else if (variable) { return new VariableItemPathSegment(qname); } else { return new NameItemPathSegment(qname); } }