class JexlNodeSet implements Set<JexlNode> {

    @Override
    public boolean retainAll(Collection<?> collection) {
        Set<String> retainKeys = new HashSet<>();
        if (collection != null) {
            for (Object o : collection) {
                retainKeys.add(buildKey((JexlNode) o));
            }
        }
        
        boolean modified = false;
        for (String key : Sets.newHashSet(nodeMap.keySet())) {
            if (!retainKeys.contains(key)) {
                if (remove(key)) {
                    modified = true;
                }
            }
        }
        return modified;
    }

    public  JexlNodeSet();
    public  JexlNodeSet(boolean useSourceNodeForKeys);

}