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

com.opencredo.concourse.data.tuples.NamedValue Maven / Gradle / Ivy

The newest version!
package com.opencredo.concourse.data.tuples;

import java.util.Map;
import java.util.function.Consumer;

/**
 * A name/value pair which can be added to a {@link Map}
 */
@FunctionalInterface
public interface NamedValue extends Consumer> {

    /**
     * Create a new name/value pair
     * @param name
     * @param value
     * @return The constructed name/value pair
     */
    static NamedValue of(String name, Object value) {
        return m -> m.put(name, value);
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy