/** * Returns the next key part of this configuration key. The boolean * parameter indicates wheter a decorated key should be returned. This * affects only attribute keys: if the parameter is <b>false</b>, the * attribute markers are stripped from the key; if it is <b>true</b>, * they remain. * * @param decorated a flag if the decorated key is to be returned * @return the next key part */ public String nextKey(boolean decorated) { if (!hasNext()) { throw new NoSuchElementException("No more key parts!"); } hasIndex = false; indexValue = -1; String key = findNextIndices(); current = key; hasIndex = checkIndex(key); attribute = checkAttribute(current); return currentKey(decorated); }
/** * Returns the next key part of this configuration key. The boolean * parameter indicates wheter a decorated key should be returned. This * affects only attribute keys: if the parameter is <b>false</b>, the * attribute markers are stripped from the key; if it is <b>true</b>, * they remain. * * @param decorated a flag if the decorated key is to be returned * @return the next key part */ public String nextKey(boolean decorated) { if (!hasNext()) { throw new NoSuchElementException("No more key parts!"); } hasIndex = false; indexValue = -1; String key = findNextIndices(); current = key; hasIndex = checkIndex(key); attribute = checkAttribute(current); return currentKey(decorated); }
+ " (Attribute key in the middle.)"); result.addPathNode(it.currentKey()); it.next(); result.setNewNodeName(it.currentKey()); result.setAttribute(!it.isPropertyKey()); return result;
+ " (Attribute key in the middle.)"); result.addPathNode(it.currentKey()); it.next(); result.setNewNodeName(it.currentKey()); result.setAttribute(!it.isPropertyKey()); return result;
/** * Returns the current key of the iteration (without skipping to the * next element). This is the same key the previous {@code next()} * call had returned. (Short form of {@code currentKey(false)}. * * @return the current key */ public String currentKey() { return currentKey(false); }
/** * Returns the current key of the iteration (without skipping to the * next element). This is the same key the previous {@code next()} * call had returned. (Short form of {@code currentKey(false)}. * * @return the current key */ public String currentKey() { return currentKey(false); }