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

com.github.alexmojaki.caseclasses.ResultBuilder Maven / Gradle / Ivy

The newest version!
package com.github.alexmojaki.caseclasses;

/**
 * This interface receives components from the {@link CaseClass#buildResult(ResultBuilder)}
 * method and uses it to construct some result. Each {@code add} method
 * should return the same builder so that method calls can be chained. The builder
 * should behave identically whether it receives a primitive value or the boxed value
 * of the corresponding wrapper type - the methods with primitive values exist only
 * to allow boosting performance.
 */
public interface ResultBuilder {

    ResultBuilder add(String name, Object value);

    ResultBuilder add(String name, int value);

    ResultBuilder add(String name, boolean value);

    ResultBuilder add(String name, float value);

    ResultBuilder add(String name, double value);

    ResultBuilder add(String name, long value);

    ResultBuilder add(String name, byte value);

    ResultBuilder add(String name, short value);

    ResultBuilder add(String name, char value);

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy