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

com.github.davidmoten.odata.client.NameValue Maven / Gradle / Ivy

package com.github.davidmoten.odata.client;

import java.util.Optional;

import com.github.davidmoten.guavamini.Preconditions;

public final class NameValue {

    private final String name;
    private final Object value;

    public NameValue(String name, Object value) {
        Preconditions.checkNotNull(value);
        this.name = name;
        this.value = value;
    }

    public NameValue(String value) {
        this(null, value);
    }

    public Optional name() {
        return Optional.ofNullable(name);
    }

    public String value() {
        return value.toString();
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy