![JAR search and dependency download from the Maven repository](/logo.png)
ca.odell.glazedlists.impl.functions.ConstantFunction Maven / Gradle / Ivy
/* Glazed Lists (c) 2003-2006 */
/* http://publicobject.com/glazedlists/ publicobject.com,*/
/* O'Dell Engineering Ltd.*/
package ca.odell.glazedlists.impl.functions;
import ca.odell.glazedlists.FunctionList;
/**
* A function function that always returnss the same value regardless of the
* input.
*
* @author James Lemieux
*/
public class ConstantFunction implements FunctionList.Function {
private final V value;
public ConstantFunction(V value) {
this.value = value;
}
@Override
public V evaluate(E sourceValue) {
return value;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy