@Test public void testCutTails() { List<String> relsExtPath = new ArrayList<String>() { { add("uuid:root"); add("uuid:monograph"); add("uuid:internalpart"); add("uuid:page"); } }; List<String> cutTailPath0 = new ArrayList<String>() { { add("uuid:root"); add("uuid:monograph"); add("uuid:internalpart"); } }; List<String> cutTailPath1 = new ArrayList<String>() { { add("uuid:root"); add("uuid:monograph"); } }; List<String> cutTailPath2 = new ArrayList<String>() { { add("uuid:root"); } }; ObjectPidsPath path = new ObjectPidsPath(relsExtPath.toArray(new String[relsExtPath.size()])); ObjectPidsPath cutTail0 = path.cutTail(0); TestCase.assertEquals(Arrays.asList(cutTail0.getPathFromRootToLeaf()), cutTailPath0); ObjectPidsPath cutTail1 = path.cutTail(1); TestCase.assertEquals(Arrays.asList(cutTail1.getPathFromRootToLeaf()), cutTailPath1); ObjectPidsPath cutTail2 = path.cutTail(2); TestCase.assertEquals(Arrays.asList(cutTail2.getPathFromRootToLeaf()), cutTailPath2); }
@Override public ObjectPidsPath cutTail(int indexFrom) { return new ObjectPidsPath(super.cutTailInternal(indexFrom)); }
ObjectPidsPath extends AbstractObjectPath { @Override public ObjectPidsPath cutTail(int indexFrom) { return new ObjectPidsPath(super.cutTailInternal(indexFrom)); } }
ObjectPidsPath extends AbstractObjectPath { @Override public ObjectPidsPath cutTail(int indexFrom) { return new ObjectPidsPath(super.cutTailInternal(indexFrom)); } ObjectPidsPath(String... pathFromRootToLeaf);  ObjectPidsPath(List<String> pathFromRootToLeaf); }
ObjectPidsPath extends AbstractObjectPath { @Override public ObjectPidsPath cutTail(int indexFrom) { return new ObjectPidsPath(super.cutTailInternal(indexFrom)); } ObjectPidsPath(String... pathFromRootToLeaf);  ObjectPidsPath(List<String> pathFromRootToLeaf); @Override ObjectPidsPath cutHead(int indexFrom); @Override ObjectPidsPath cutTail(int indexFrom); @Override ObjectPidsPath injectRepository(); ObjectPidsPath injectCollections(CollectionsManager col); @Override ObjectPidsPath replace(String src, String dest); @Override ObjectPidsPath injectObjectBetween(String injectingObject, Between between); }
ObjectPidsPath extends AbstractObjectPath { @Override public ObjectPidsPath cutTail(int indexFrom) { return new ObjectPidsPath(super.cutTailInternal(indexFrom)); } ObjectPidsPath(String... pathFromRootToLeaf);  ObjectPidsPath(List<String> pathFromRootToLeaf); @Override ObjectPidsPath cutHead(int indexFrom); @Override ObjectPidsPath cutTail(int indexFrom); @Override ObjectPidsPath injectRepository(); ObjectPidsPath injectCollections(CollectionsManager col); @Override ObjectPidsPath replace(String src, String dest); @Override ObjectPidsPath injectObjectBetween(String injectingObject, Between between); static final Logger LOGGER; static ObjectPidsPath REPOSITORY_PATH; }