public void removeAll(Set<DestinationNode> answer, String[] paths, int startIndex) { DestinationNode node = this; int size = paths.length; for (int i = startIndex; i < size && node != null; i++) { String path = paths[i]; if (path.equals(ANY_DESCENDENT)) { answer.addAll(node.removeDesendentValues()); break; } // TODO is this correct, we are appending wildcard values here??? node.appendMatchingWildcards(answer, paths, i); if (path.equals(ANY_CHILD)) { // node = node.getAnyChildNode(); node = new AnyChildDestinationNode(node); } else { node = node.getChild(path); } } if (node != null) { answer.addAll(node.removeValues()); } }
public void appendMatchingValues(Set<DestinationNode> answer, String[] paths, int startIndex, boolean deep) { DestinationNode node = this; boolean couldMatchAny = true; int size = paths.length; for (int i = startIndex; i < size && node != null; i++) { String path = paths[i]; if (deep && path.equals(ANY_DESCENDENT)) { answer.addAll(node.getDesendentValues()); couldMatchAny = false; break; } node.appendMatchingWildcards(answer, paths, i); if (path.equals(ANY_CHILD)) { node = new AnyChildDestinationNode(node); } else { node = node.getChild(path); } } if (node != null) { answer.addAll(node.getValues()); if (couldMatchAny) { // lets allow FOO.BAR to match the FOO.BAR.> entry in the map DestinationNode child = node.getChild(ANY_DESCENDENT); if (child != null) { answer.addAll(child.getValues()); } } } }
public void removeAll(Set<DestinationNode> answer, String[] paths, int startIndex) { DestinationNode node = this; int size = paths.length; for (int i = startIndex; i < size && node != null; i++) { String path = paths[i]; if (path.equals(ANY_DESCENDENT)) { answer.addAll(node.removeDesendentValues()); break; } // TODO is this correct, we are appending wildcard values here??? node.appendMatchingWildcards(answer, paths, i); if (path.equals(ANY_CHILD)) { // node = node.getAnyChildNode(); node = new AnyChildDestinationNode(node); } else { node = node.getChild(path); } } if (node != null) { answer.addAll(node.removeValues()); } }
public void removeAll(Set<DestinationNode> answer, String[] paths, int startIndex) { DestinationNode node = this; int size = paths.length; for (int i = startIndex; i < size && node != null; i++) { String path = paths[i]; if (path.equals(ANY_DESCENDENT)) { answer.addAll(node.removeDesendentValues()); break; } // TODO is this correct, we are appending wildcard values here??? node.appendMatchingWildcards(answer, paths, i); if (path.equals(ANY_CHILD)) { // node = node.getAnyChildNode(); node = new AnyChildDestinationNode(node); } else { node = node.getChild(path); } } if (node != null) { answer.addAll(node.removeValues()); } }
public void removeAll(Set<DestinationNode> answer, String[] paths, int startIndex) { DestinationNode node = this; int size = paths.length; for (int i = startIndex; i < size && node != null; i++) { String path = paths[i]; if (path.equals(ANY_DESCENDENT)) { answer.addAll(node.removeDesendentValues()); break; } // TODO is this correct, we are appending wildcard values here??? node.appendMatchingWildcards(answer, paths, i); if (path.equals(ANY_CHILD)) { // node = node.getAnyChildNode(); node = new AnyChildDestinationNode(node); } else { node = node.getChild(path); } } if (node != null) { answer.addAll(node.removeValues()); } }
public void removeAll(Set answer, String[] paths, int startIndex) { DestinationNode node = this; int size = paths.length; for (int i = startIndex; i < size && node != null; i++) { String path = paths[i]; if (path.equals(ANY_DESCENDENT)) { answer.addAll(node.removeDesendentValues()); break; } node.appendMatchingWildcards(answer, paths, i); if (path.equals(ANY_CHILD)) { // node = node.getAnyChildNode(); node = new AnyChildDestinationNode(node); } else { node = node.getChild(path); } } if (node != null) { answer.addAll(node.removeValues()); } }
public void appendMatchingValues(Set<DestinationNode> answer, String[] paths, int startIndex, boolean deep) { DestinationNode node = this; boolean couldMatchAny = true; int size = paths.length; for (int i = startIndex; i < size && node != null; i++) { String path = paths[i]; if (deep && path.equals(ANY_DESCENDENT)) { answer.addAll(node.getDesendentValues()); couldMatchAny = false; break; } node.appendMatchingWildcards(answer, paths, i); if (path.equals(ANY_CHILD)) { node = new AnyChildDestinationNode(node); } else { node = node.getChild(path); } } if (node != null) { answer.addAll(node.getValues()); if (couldMatchAny) { // lets allow FOO.BAR to match the FOO.BAR.> entry in the map DestinationNode child = node.getChild(ANY_DESCENDENT); if (child != null) { answer.addAll(child.getValues()); } } } }
public void appendMatchingValues(Set<DestinationNode> answer, String[] paths, int startIndex, boolean deep) { DestinationNode node = this; boolean couldMatchAny = true; int size = paths.length; for (int i = startIndex; i < size && node != null; i++) { String path = paths[i]; if (deep && path.equals(ANY_DESCENDENT)) { answer.addAll(node.getDesendentValues()); couldMatchAny = false; break; } node.appendMatchingWildcards(answer, paths, i); if (path.equals(ANY_CHILD)) { node = new AnyChildDestinationNode(node); } else { node = node.getChild(path); } } if (node != null) { answer.addAll(node.getValues()); if (couldMatchAny) { // lets allow FOO.BAR to match the FOO.BAR.> entry in the map DestinationNode child = node.getChild(ANY_DESCENDENT); if (child != null) { answer.addAll(child.getValues()); } } } }
public void appendMatchingValues(Set answer, String[] paths, int startIndex) { DestinationNode node = this; boolean couldMatchAny = true; int size = paths.length; for (int i = startIndex; i < size && node != null; i++) { String path = paths[i]; if (path.equals(ANY_DESCENDENT)) { answer.addAll(node.getDesendentValues()); couldMatchAny = false; break; } node.appendMatchingWildcards(answer, paths, i); if (path.equals(ANY_CHILD)) { node = new AnyChildDestinationNode(node); } else { node = node.getChild(path); } } if (node != null) { answer.addAll(node.getValues()); if (couldMatchAny) { // lets allow FOO.BAR to match the FOO.BAR.> entry in the map DestinationNode child = node.getChild(ANY_DESCENDENT); if (child != null) { answer.addAll(child.getValues()); } } } }
public void appendMatchingValues(Set<DestinationNode> answer, String[] paths, int startIndex, boolean deep) { DestinationNode node = this; boolean couldMatchAny = true; int size = paths.length; for (int i = startIndex; i < size && node != null; i++) { String path = paths[i]; if (deep && path.equals(ANY_DESCENDENT)) { answer.addAll(node.getDesendentValues()); couldMatchAny = false; break; } node.appendMatchingWildcards(answer, paths, i); if (path.equals(ANY_CHILD)) { node = new AnyChildDestinationNode(node); } else { node = node.getChild(path); } } if (node != null) { answer.addAll(node.getValues()); if (couldMatchAny) { // lets allow FOO.BAR to match the FOO.BAR.> entry in the map DestinationNode child = node.getChild(ANY_DESCENDENT); if (child != null) { answer.addAll(child.getValues()); } } } }