de.fu_berlin.ties.classify.feature
Class DefaultFeature

java.lang.Object
  extended byde.fu_berlin.ties.classify.feature.Feature
      extended byde.fu_berlin.ties.classify.feature.DefaultFeature

public class DefaultFeature
extends Feature

Default implementation of the Feature class. Instances of this class are immutable and thus thread-safe.

Version:
$Revision: 1.2 $, $Date: 2004/04/01 08:44:33 $, $Author: siefkes $
Author:
Christian Siefkes

Constructor Summary
DefaultFeature(String rep)
          Creates a new instance, without storing a comment.
DefaultFeature(String rep, String myComment)
          Creates a new instance.
 
Method Summary
 String getRepresentation()
          Returns the representation of this feature, to be used for classification.
 String toString()
          Returns a string representation of this object.
 
Methods inherited from class de.fu_berlin.ties.classify.feature.Feature
equals, getComment, getFullRepresentation, getFullRepresentation, hashCode
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DefaultFeature

public DefaultFeature(String rep)
Creates a new instance, without storing a comment.

Parameters:
rep - the representation of this feature; or null to create a comment-only feature

DefaultFeature

public DefaultFeature(String rep,
                      String myComment)
Creates a new instance.

Parameters:
rep - the representation of this feature; or null to create a comment-only feature
myComment - a comment on this feature or the features to follow; might be null
Method Detail

getRepresentation

public String getRepresentation()
Returns the representation of this feature, to be used for classification.

Specified by:
getRepresentation in class Feature
Returns:
the feature representation, or null if this feature contains only a comment

toString

public String toString()
Returns a string representation of this object.

Overrides:
toString in class Feature
Returns:
a textual representation


Copyright © 2003-2004 Christian Siefkes. All Rights Reserved.