@Test public void testShift_01() { Path path0 = new Path("identifications.0.defaultClassification.kingdom"); Path path1 = new Path("0.defaultClassification.kingdom"); assertEquals("01", path1, path0.shift()); path0 = path1; path1 = new Path("defaultClassification.kingdom"); assertEquals("02", path1, path0.shift()); path0 = path1; path1 = new Path("kingdom"); }
public Path shift() { String[] shifted = new String[elems.length - 1]; arraycopy(elems, 1, shifted, 0, elems.length - 1); return new Path(shifted); }
Path implements Comparable<Path> { public Path shift() { String[] shifted = new String[elems.length - 1]; arraycopy(elems, 1, shifted, 0, elems.length - 1); return new Path(shifted); } }
Path implements Comparable<Path> { public Path shift() { String[] shifted = new String[elems.length - 1]; arraycopy(elems, 1, shifted, 0, elems.length - 1); return new Path(shifted); } Path(); @JsonCreator  Path(String path);  Path(String[] elements);  Path(Path other); }
Path implements Comparable<Path> { public Path shift() { String[] shifted = new String[elems.length - 1]; arraycopy(elems, 1, shifted, 0, elems.length - 1); return new Path(shifted); } Path(); @JsonCreator  Path(String path);  Path(String[] elements);  Path(Path other); Path element(int index); String getElement(int index); int countElements(); Path getPurePath(); Path append(String path); Path append(Path other); Path replace(int element, String newValue); Path shift(); @Override boolean equals(Object obj); @Override int hashCode(); @Override @JsonValue String toString(); @Override int compareTo(Path other); }
Path implements Comparable<Path> { public Path shift() { String[] shifted = new String[elems.length - 1]; arraycopy(elems, 1, shifted, 0, elems.length - 1); return new Path(shifted); } Path(); @JsonCreator  Path(String path);  Path(String[] elements);  Path(Path other); Path element(int index); String getElement(int index); int countElements(); Path getPurePath(); Path append(String path); Path append(Path other); Path replace(int element, String newValue); Path shift(); @Override boolean equals(Object obj); @Override int hashCode(); @Override @JsonValue String toString(); @Override int compareTo(Path other);  }