org.jhotdraw8.icollection.facade.ImmutableMapFacade Maven / Gradle / Ivy
/*
* @(#)ImmutableMapFacade.java
* Copyright © 2023 The authors and contributors of JHotDraw. MIT License.
*/
package org.jhotdraw8.icollection.facade;
import org.jhotdraw8.icollection.immutable.ImmutableMap;
import org.jhotdraw8.icollection.impl.iteration.Iterators;
import org.jhotdraw8.icollection.readonly.AbstractReadOnlyMap;
import org.jhotdraw8.icollection.readonly.ReadOnlyCollection;
import org.jspecify.annotations.Nullable;
import java.util.Collection;
import java.util.HashSet;
import java.util.Iterator;
import java.util.Map;
import java.util.Objects;
import java.util.Spliterator;
import java.util.function.Function;
/**
* Provides a {@link ImmutableMap} facade to a set of {@code ImmutableMap} functions.
*
* @param the key type
* @param the element type
*/
public class ImmutableMapFacade extends AbstractReadOnlyMap implements ImmutableMap {
private final Map target;
private final Function