protected boolean discardPath ( String pathToEntry , Entry < String , Object > entry ) { if ( ! foundAsPrefix ( pathToEntry ) || ! delim . accept ( entry . getKey ( ) ) ) { //skip traversal of subtree and remove from the traversal iterator return true ; } return false ; }
if the full path to the entry is not contained in any of the paths to retain - remove it from the object this step does not remove entries whose full path is contained in a path to retain but are not equal to an entry to retain