All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.jhotdraw8.icollection.immutable.ImmutableNavigableMap Maven / Gradle / Ivy

package org.jhotdraw8.icollection.immutable;

import org.jhotdraw8.icollection.readonly.ReadOnlyCollection;
import org.jhotdraw8.icollection.readonly.ReadOnlyNavigableMap;
import org.jspecify.annotations.Nullable;

import java.util.Map;

/**
 * An interface to an immutable navigable map; the implementation guarantees that the state of the collection does not change.
 *
 * @param  the key type
 * @param  the value type
 */
public interface ImmutableNavigableMap extends ReadOnlyNavigableMap, ImmutableSortedMap {
    @Override
    ImmutableNavigableMap clear();

    @Override
    ImmutableNavigableMap put(K key, @Nullable V value);

    @Override
    default ImmutableNavigableMap putAll(Map m) {
        return (ImmutableNavigableMap) ImmutableSortedMap.super.putAll(m);
    }

    @Override
    default ImmutableNavigableMap putAll(Iterable> c) {
        return (ImmutableNavigableMap) ImmutableSortedMap.super.putAll(c);
    }

    @Override
    default ImmutableNavigableMap putKeyValues(Object... kv) {
        return (ImmutableNavigableMap) ImmutableSortedMap.super.putKeyValues(kv);
    }

    @Override
    ImmutableNavigableMap remove(K key);

    @Override
    default ImmutableNavigableMap removeAll(Iterable c) {
        return (ImmutableNavigableMap) ImmutableSortedMap.super.removeAll(c);
    }

    @Override
    default ImmutableNavigableMap retainAll(Iterable c) {
        return (ImmutableNavigableMap) ImmutableSortedMap.super.retainAll(c);
    }

    @Override
    default ImmutableNavigableMap retainAll(ReadOnlyCollection c) {
        return (ImmutableNavigableMap) ImmutableSortedMap.super.retainAll(c);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy