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

io.inbot.utils.maps.ImmutableMapEntry Maven / Gradle / Ivy

Go to download

Misc utility classes we use at Inbot that are probably useful for a broader public.

There is a newer version: 1.28
Show newest version
package io.inbot.utils.maps;

import java.util.Map.Entry;

public class ImmutableMapEntry implements Entry {
    private final KEY key;
    private final VALUE value;

    public ImmutableMapEntry(KEY key, VALUE value) {
        this.key=key;
        this.value=value;
    }

    @Override
    public KEY getKey() {
        return key;
    }

    @Override
    public VALUE getValue() {
        return value;
    }

    @Override
    public VALUE setValue(VALUE value) {
        throw new UnsupportedOperationException("entries are immutable");
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy