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

berlin.yuna.natsserver.model.MapValue Maven / Gradle / Ivy

Go to download

Nats streaming server for testing which contains the original Nats streaming server

There is a newer version: 0.25.7-rc.25
Show newest version
package berlin.yuna.natsserver.model;

public class MapValue {

    private ValueSource source;
    private String value;

    public static MapValue mapValueOf(final ValueSource source, final String value) {
        return new MapValue(source, value);
    }

    public MapValue(final ValueSource source, final String value) {
        this.source = source;
        this.value = value;
    }

    public MapValue update(final ValueSource source, final String value) {
        if (source.ordinal() >= this.source.ordinal()) {
            this.source = source;
            this.value = value;
        }
        return this;
    }

    public ValueSource source() {
        return source;
    }

    public String value() {
        return value;
    }

    @Override
    public String toString() {
        return "ConfigValue{" +
                "source=" + source +
                ", value='" + value + '\'' +
                '}';
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy