@Test (expected = IndexOutOfBoundsException.class) public void elementAccessMustBeWithinBounds() { final CloudnamePath path = new CloudnamePath(twoElements); path.get(2); }
public String get(final int index) { return pathElements[index]; }
CloudnamePath { public String get(final int index) { return pathElements[index]; } }
CloudnamePath { public String get(final int index) { return pathElements[index]; } CloudnamePath(final String[] pathElements);  CloudnamePath(final CloudnamePath path, final String additionalElement); }
CloudnamePath { public String get(final int index) { return pathElements[index]; } CloudnamePath(final String[] pathElements);  CloudnamePath(final CloudnamePath path, final String additionalElement); static boolean isValidPathElementName(final String name); int length(); String join(final char separator); String get(final int index); boolean isSubpathOf(final CloudnamePath other); CloudnamePath getParent(); @Override boolean equals(final Object other); @Override int hashCode(); @Override String toString(); }
CloudnamePath { public String get(final int index) { return pathElements[index]; } CloudnamePath(final String[] pathElements);  CloudnamePath(final CloudnamePath path, final String additionalElement); static boolean isValidPathElementName(final String name); int length(); String join(final char separator); String get(final int index); boolean isSubpathOf(final CloudnamePath other); CloudnamePath getParent(); @Override boolean equals(final Object other); @Override int hashCode(); @Override String toString();  }