@Test public void testReplaceParent() { ClassPropertyReference reference = new ClassPropertyReference("prop", new DocumentReference("wiki", "space", "page")) .replaceParent(new DocumentReference("wiki2", "space2", "page2")); assertEquals(new ClassPropertyReference("prop", new DocumentReference("wiki2", "space2", "page2")), reference); assertSame(reference, reference.replaceParent(reference.getParent())); }
@Override public ClassPropertyReference replaceParent(EntityReference oldParent, EntityReference newParent) { if (newParent == oldParent) { return this; } return new ClassPropertyReference(this, oldParent, newParent); }
ClassPropertyReference extends EntityReference { @Override public ClassPropertyReference replaceParent(EntityReference oldParent, EntityReference newParent) { if (newParent == oldParent) { return this; } return new ClassPropertyReference(this, oldParent, newParent); } }
ClassPropertyReference extends EntityReference { @Override public ClassPropertyReference replaceParent(EntityReference oldParent, EntityReference newParent) { if (newParent == oldParent) { return this; } return new ClassPropertyReference(this, oldParent, newParent); } ClassPropertyReference(EntityReference reference); protected  ClassPropertyReference(EntityReference reference, EntityReference oldReference,
        EntityReference newReference);  ClassPropertyReference(String propertyName, DocumentReference classReference);  ClassPropertyReference(EntityReference reference, EntityReference parent); @Deprecated  ClassPropertyReference(String wiki, String space, String page, String propertyName); }
ClassPropertyReference extends EntityReference { @Override public ClassPropertyReference replaceParent(EntityReference oldParent, EntityReference newParent) { if (newParent == oldParent) { return this; } return new ClassPropertyReference(this, oldParent, newParent); } ClassPropertyReference(EntityReference reference); protected  ClassPropertyReference(EntityReference reference, EntityReference oldReference,
        EntityReference newReference);  ClassPropertyReference(String propertyName, DocumentReference classReference);  ClassPropertyReference(EntityReference reference, EntityReference parent); @Deprecated  ClassPropertyReference(String wiki, String space, String page, String propertyName); @Override ClassPropertyReference replaceParent(EntityReference oldParent, EntityReference newParent); @Override ClassPropertyReference replaceParent(EntityReference newParent); }
ClassPropertyReference extends EntityReference { @Override public ClassPropertyReference replaceParent(EntityReference oldParent, EntityReference newParent) { if (newParent == oldParent) { return this; } return new ClassPropertyReference(this, oldParent, newParent); } ClassPropertyReference(EntityReference reference); protected  ClassPropertyReference(EntityReference reference, EntityReference oldReference,
        EntityReference newReference);  ClassPropertyReference(String propertyName, DocumentReference classReference);  ClassPropertyReference(EntityReference reference, EntityReference parent); @Deprecated  ClassPropertyReference(String wiki, String space, String page, String propertyName); @Override ClassPropertyReference replaceParent(EntityReference oldParent, EntityReference newParent); @Override ClassPropertyReference replaceParent(EntityReference newParent);  }