edu.columbia.cs.ref.model.core.structure.optimization
Class FeaturesDictionary

java.lang.Object
  extended by edu.columbia.cs.ref.model.core.structure.optimization.FeaturesDictionary

public class FeaturesDictionary
extends java.lang.Object

The Class FeaturesDictionary represents an object that stores String-based features and, for a given value, always returns the same object. By returning always the same object for a given value, the comparisons between string-based features can be done by using the '==' operator instead of equals.

This class is used only for optimization purposes.

Since:
2011-09-27
Version:
0.1
Author:
Pablo Barrio, Goncalo Simoes

Constructor Summary
FeaturesDictionary()
           
 
Method Summary
 java.lang.String getFeature(java.lang.String result)
          Given a string as an input value, it returns a string with that same value.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FeaturesDictionary

public FeaturesDictionary()
Method Detail

getFeature

public java.lang.String getFeature(java.lang.String result)
Given a string as an input value, it returns a string with that same value. However, it is guaranteed that if this method is called for different string objects with the same value, it will return the very same object.

Parameters:
result - the value of the string-based feature to be retrieved
Returns:
an object with the same value as result but that is guaranteed to be the same for every call of this method with the same value