edu.columbia.cs.ref.model
Class FeaturableObject

java.lang.Object
  extended by edu.columbia.cs.ref.model.FeaturableObject
Direct Known Subclasses:
CandidateSentence, Sentence

public class FeaturableObject
extends java.lang.Object

The Class FeaturableObject represents objects that can be enriched with features.

Essentially, this class provides methods to store and retrieve features of a given type on an object.

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

Constructor Summary
FeaturableObject()
          Instantiates a new featurable object.
 
Method Summary
<E extends FeatureSet>
E
getFeatures(FeatureGenerator<E> featureGenerator)
          Retrieves the features that were produced by a given feature generator.
<E extends FeatureSet>
void
setFeatures(FeatureGenerator<E> featureGenerator, E fs)
          Stores the features that were produced by a given feature generator.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FeaturableObject

public FeaturableObject()
Instantiates a new featurable object.

Method Detail

getFeatures

public <E extends FeatureSet> E getFeatures(FeatureGenerator<E> featureGenerator)
Retrieves the features that were produced by a given feature generator.

Type Parameters:
E - the type of feature to be retrieved
Parameters:
featureGenerator - the feature generator that produced the feature to be retrieved
Returns:
the feature produced by the input feature generator

setFeatures

public <E extends FeatureSet> void setFeatures(FeatureGenerator<E> featureGenerator,
                                               E fs)
Stores the features that were produced by a given feature generator.

Type Parameters:
E - the type of feature to be stored
Parameters:
featureGenerator - the feature generator that produced the feature to be stored
fs - the feature to be stored