public class NormalizedNodeGetter implements
NormalizedNodeVisitor {
private final String path;
- NormalizedNode output;
+ NormalizedNode<?, ?> output;
public NormalizedNodeGetter(String path){
Preconditions.checkNotNull(path);
}
@Override
- public void visitNode(int level, String parentPath, NormalizedNode normalizedNode) {
- String nodePath = parentPath + "/"+ normalizedNode.getIdentifier().toString();
+ public void visitNode(int level, String parentPath, NormalizedNode<?, ?> normalizedNode) {
+ String nodePath = parentPath + "/"+ PathUtils.toString(normalizedNode.getIdentifier());
if(nodePath.toString().equals(path)){
output = normalizedNode;
}
}
- public NormalizedNode getOutput(){
+ public NormalizedNode<?, ?> getOutput(){
return output;
}
}