org.eobjects.metamodel.util
Class ConstantFunc<I,O>
java.lang.Object
org.eobjects.metamodel.util.ConstantFunc<I,O>
- Type Parameters:
I - O -
- All Implemented Interfaces:
- Func<I,O>
public final class ConstantFunc<I,O>
- extends Object
- implements Func<I,O>
A function that always returns the same constant response.
|
Method Summary |
boolean |
equals(Object obj)
|
O |
eval(I arg)
Evaluates an element and transforms it using this function. |
int |
hashCode()
|
ConstantFunc
public ConstantFunc(O response)
eval
public O eval(I arg)
- Description copied from interface:
Func
- Evaluates an element and transforms it using this function.
- Specified by:
eval in interface Func<I,O>
- Parameters:
arg - the input given to the function
- Returns:
- the output result of the function
hashCode
public int hashCode()
- Overrides:
hashCode in class Object
equals
public boolean equals(Object obj)
- Overrides:
equals in class Object
Copyright © 2007-2013. All Rights Reserved.