class PredicateMapView<K, V> extends GridSerializableMap<K, V> {
    /** */
    private static final long serialVersionUID = 5531745605372387948L;

    /** */
    private final Map<K, V> map;

    /** */
    private final IgnitePredicate<? super K>[] preds;

    /** Entry predicate. */
    private IgnitePredicate<Entry<K, V>> entryPred;

    /**
     * @param map Input map that serves as a base for the view.
     * @param preds Optional predicates. If predicates are not provided - all will be in the view.
     */
    @SuppressWarnings({"unchecked"})
    public PredicateMapView(Map<K, V> map, IgnitePredicate<? super K>... preds) {
        this.map = map;
        this.preds = preds;
        this.entryPred = new EntryByKeyEvaluationPredicate(preds);
    }

    /** {@inheritDoc} */
    @NotNull @Override public Set<Entry<K, V>> entrySet() {<FILL_FUNCTION_BODY>}

    /** {@inheritDoc} */
    @Override public boolean isEmpty() {
        return entrySet().isEmpty();
    }

    /** {@inheritDoc} */
    @Nullable @Override public V get(Object key) {
        return GridFunc.isAll((K)key, preds) ? map.get(key) : null;
    }

    /** {@inheritDoc} */
    @Nullable @Override public V put(K key, V val) {
        V oldVal = get(key);

        if (GridFunc.isAll(key, preds))
            map.put(key, val);

        return oldVal;
    }

    /** {@inheritDoc} */
    @Override public boolean containsKey(Object key) {
        return GridFunc.isAll((K)key, preds) && map.containsKey(key);
    }
}

        return new GridSerializableSet<Entry<K, V>>() {
            @NotNull
            @Override public Iterator<Entry<K, V>> iterator() {
                return GridFunc.iterator0(map.entrySet(), false, entryPred);
            }

            @Override public int size() {
                return F.size(map.keySet(), preds);
            }

            @Override public boolean remove(Object o) {
                return F.isAll((Entry<K, V>)o, entryPred) && map.entrySet().remove(o);
            }

            @Override public boolean contains(Object o) {
                return F.isAll((Entry<K, V>)o, entryPred) && map.entrySet().contains(o);
            }

            @Override public boolean isEmpty() {
                return !iterator().hasNext();
            }
        };
    
<methods>public non-sealed void <init>() <variables>private static final long serialVersionUID