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

com.blazebit.lang.ValueHolder Maven / Gradle / Ivy

There is a newer version: 1.6.11
Show newest version
package com.blazebit.lang;

/**
 * As the name says, value holders hold a value that can be accessed.
 * {@link ValueHolder}s are mutable and the methods may throw
 * {@link RuntimeException}s.
 *
 * @param  The type of the value that is held by the value holder.
 * @author Christian Beikov
 * @since 1.0
 */
public interface ValueHolder {

    /**
     * Returns the value of the value holder. Subsequent call may return
     * different values. The concrete value holder may throw
     * {@link RuntimeException}s.
     *
     * @return The value of the value holder.
     */
    public X getValue();

    /**
     * Sets the value of the value holder. The concrete value holder may throw
     * {@link RuntimeException}s.
     *
     * @param value The new value of the value holder.
     */
    public void setValue(X value);

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy