org.jhotdraw8.icollection.facade.ReadOnlyMapFacade Maven / Gradle / Ivy
/*
* @(#)ReadOnlyMapFacade.java
* Copyright © 2023 The authors and contributors of JHotDraw. MIT License.
*/
package org.jhotdraw8.icollection.facade;
import org.jhotdraw8.icollection.readonly.ReadOnlyMap;
import org.jspecify.annotations.Nullable;
import java.util.Iterator;
import java.util.Map;
import java.util.Objects;
import java.util.function.Function;
import java.util.function.IntSupplier;
import java.util.function.Predicate;
import java.util.function.Supplier;
/**
* Provides a {@link ReadOnlyMap} facade to a set of {@code ReadOnlyMap} functions.
*
* @param the key type
* @param the value type
* @author Werner Randelshofer
*/
public class ReadOnlyMapFacade implements ReadOnlyMap {
protected final Supplier>> iteratorFunction;
protected final IntSupplier sizeFunction;
protected final Predicate