de.fu_berlin.ties.classify.feature
Class DefaultFeature

java.lang.Object
  extended by de.fu_berlin.ties.classify.feature.Feature
      extended by de.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.7 $, $Date: 2006/10/21 16:03:57 $, $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
compactRepresentation, equals, getComment, getFullRepresentation, getFullRepresentation, getUserData, hashCode, setUserData
 
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-2007 Christian Siefkes. All Rights Reserved.