ca.odell.glazedlists.impl.functions.ConstantFunction Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of glazedlists_java15 Show documentation
Show all versions of glazedlists_java15 Show documentation
Event-driven lists for dynamically filtered and sorted tables
The newest version!
/* 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;
}
public V evaluate(E sourceValue) {
return value;
}
}