/** * Returns every elements in the sequence of {@linkplain #getParsedNames() parsed names} * except for the {@linkplain #head() head}. * * @return all elements except the first one in the in the list of {@linkplain #getParsedNames() parsed names}. */ @Override public synchronized GenericName tail() { if (tail == null) { final int size = parsedNames.size(); switch (size) { default: tail = new DefaultScopedName(parsedNames.subList(1, size)); break; case 2: tail = parsedNames.get(1); break; case 1: // fall through case 0: throw new AssertionError(size); } } return tail; }
/** * Returns every element in the sequence of {@linkplain #getParsedNames() parsed names} * except for the {@linkplain #tip() tip}. * * @return all elements except the last one in the in the list of {@linkplain #getParsedNames() parsed names}. */ @Override public synchronized GenericName path() { if (path == null) { final int size = parsedNames.size(); switch (size) { default: path = new DefaultScopedName(parsedNames.subList(0, size-1)); break; case 2: path = parsedNames.get(0); break; case 1: // fall through case 0: throw new AssertionError(size); } } return path; }
/** * Returns every element in the sequence of {@linkplain #getParsedNames() parsed names} * except for the {@linkplain #tip() tip}. * * @return all elements except the last one in the in the list of {@linkplain #getParsedNames() parsed names}. */ @Override public synchronized GenericName path() { if (path == null) { final int size = parsedNames.size(); switch (size) { default: path = new DefaultScopedName(parsedNames.subList(0, size-1)); break; case 2: path = parsedNames.get(0); break; case 1: // fall through case 0: throw new AssertionError(size); } } return path; }
/** * Returns every elements in the sequence of {@linkplain #getParsedNames() parsed names} * except for the {@linkplain #head() head}. * * @return all elements except the first one in the in the list of {@linkplain #getParsedNames() parsed names}. */ @Override public synchronized GenericName tail() { if (tail == null) { final int size = parsedNames.size(); switch (size) { default: tail = new DefaultScopedName(parsedNames.subList(1, size)); break; case 2: tail = parsedNames.get(1); break; case 1: // fall through case 0: throw new AssertionError(size); } } return tail; }