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

io.sphere.sdk.models.Builder Maven / Gradle / Ivy

There is a newer version: 1.0.0-M26
Show newest version
package io.sphere.sdk.models;

import java.util.function.Supplier;

/**
 * A {@link io.sphere.sdk.models.Builder} is a mutable data container to
 * create an immutable instance of another type.
 * @param  the type of the class where the element should be build
 */
public interface Builder extends Supplier {
    /**
     * Creates a new instance of T with the values of this builder.
     *
     * @return new instance of T.
     */
    T build();

    /**
     * Alias for {@link Builder#build()}.
     * @return a new instance of T.
     */
    default T get() {
        return build();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy