cbr.framework
Class Feature

java.lang.Object
  extended by cbr.framework.Feature
Direct Known Subclasses:
TargetFeature

public class Feature
extends Object

A feature is an attribute value pair. Features can have a weight value and each must specify a similarity metric to be used to compare features.


Constructor Summary
Feature(String name, Value value, boolean indexed)
          Creates a Feature by supplying a name and value and indicating whether the feature is indexed or not.
 
Method Summary
 String getName()
          Get the name of the feature
 String getValueAsString()
          Returns the value of this feature, represented as a String.
 boolean isIndexed()
          Returns whether the feature is indexed or not
 String toString()
          Describes the current state of this Feature
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Feature

public Feature(String name,
               Value value,
               boolean indexed)
Creates a Feature by supplying a name and value and indicating whether the feature is indexed or not.

Parameters:
name - the name of the feature
value - the value of the feature
indexed - true if the feature is indexed, otherwise false
Method Detail

getName

public String getName()
Get the name of the feature

Returns:
the name of the feature

getValueAsString

public String getValueAsString()
Returns the value of this feature, represented as a String.

Returns:
a String representing the value

isIndexed

public boolean isIndexed()
Returns whether the feature is indexed or not

Returns:
true if indexed, false if not indexed

toString

public String toString()
Describes the current state of this Feature

Overrides:
toString in class Object
Returns:
a String describing this feature