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 extends K, ? extends V> m) {
return (ImmutableNavigableMap) ImmutableSortedMap.super.putAll(m);
}
@Override
default ImmutableNavigableMap putAll(Iterable extends Map.Entry extends K, ? extends V>> 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 extends K> c) {
return (ImmutableNavigableMap) ImmutableSortedMap.super.removeAll(c);
}
@Override
default ImmutableNavigableMap retainAll(Iterable extends K> c) {
return (ImmutableNavigableMap) ImmutableSortedMap.super.retainAll(c);
}
@Override
default ImmutableNavigableMap retainAll(ReadOnlyCollection extends K> c) {
return (ImmutableNavigableMap) ImmutableSortedMap.super.retainAll(c);
}
}