messif.objects.util.impl
Class ConstantToken

java.lang.Object
  extended by messif.objects.util.impl.ConstantToken
All Implemented Interfaces:
java.io.Serializable, PatternToken

public class ConstantToken
extends java.lang.Object
implements PatternToken

Simple float constant token for the aggragation function evaluator.

See Also:
Serialized Form

Constructor Summary
ConstantToken(java.lang.String constantString)
          Constructs this object given a string which must be interpreted as a flost number.
 
Method Summary
 float evaluate(float[] subdistances)
          Return the constant
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ConstantToken

public ConstantToken(java.lang.String constantString)
              throws java.lang.IllegalArgumentException
Constructs this object given a string which must be interpreted as a flost number.

Parameters:
constantString - the float string
Throws:
java.lang.IllegalArgumentException
Method Detail

evaluate

public final float evaluate(float[] subdistances)
Return the constant

Specified by:
evaluate in interface PatternToken
Parameters:
subdistances - distnaces that are ignored by the constant.
Returns:
the constant value

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object