class PropertiesAsMap extends AbstractMap<String, String> {

    private final Map<Object, Object> properties;

    PropertiesAsMap(Map<Object, Object> properties) {
        this.properties = properties;
    }

    @Override
    public Set<Entry<String, String>> entrySet() {<FILL_FUNCTION_BODY>}

    private static boolean matches(Entry<Object, Object> entry) {
        return entry.getKey() instanceof String && entry.getValue() instanceof String;
    }
}

        return new AbstractSet<Entry<String, String>>() {
            @Override
            public Iterator<Entry<String, String>> iterator() {
                Iterator<Entry<Object, Object>> iterator = properties.entrySet().iterator();
                return new Iterator<Entry<String, String>>() {
                    Entry<String, String> next;

                    {
                        advance();
                    }

                    private void advance() {
                        next = null;
                        while (iterator.hasNext()) {
                            Entry<Object, Object> e = iterator.next();
                            if (PropertiesAsMap.matches(e)) {
                                next = new Entry<String, String>() {
                                    @Override
                                    public String getKey() {
                                        return (String) e.getKey();
                                    }

                                    @Override
                                    public String getValue() {
                                        return (String) e.getValue();
                                    }

                                    @Override
                                    public String setValue(String value) {
                                        return (String) e.setValue(value);
                                    }
                                };
                                break;
                            }
                        }
                    }

                    @Override
                    public boolean hasNext() {
                        return next != null;
                    }

                    @Override
                    public Entry<String, String> next() {
                        Entry<String, String> item = next;
                        if (item == null) {
                            throw new NoSuchElementException();
                        }
                        advance();
                        return item;
                    }
                };
            }

            @Override
            public int size() {
                return (int) properties.entrySet().stream()
                        .filter(PropertiesAsMap::matches)
                        .count();
            }
        };
    
<methods>public void clear() ,public boolean containsKey(java.lang.Object) ,public boolean containsValue(java.lang.Object) ,public abstract Set<Entry<java.lang.String,java.lang.String>> entrySet() ,public boolean equals(java.lang.Object) ,public java.lang.String get(java.lang.Object) ,public int hashCode() ,public boolean isEmpty() ,public Set<java.lang.String> keySet() ,public java.lang.String put(java.lang.String, java.lang.String) ,public void putAll(Map<? extends java.lang.String,? extends java.lang.String>) ,public java.lang.String remove(java.lang.Object) ,public int size() ,public java.lang.String toString() ,public Collection<java.lang.String> values() <variables>transient Set<java.lang.String> keySet,transient Collection<java.lang.String> values