de.fu_berlin.ties.classify.feature
Class DefaultFeatureVector

java.lang.Object
  extended by de.fu_berlin.ties.classify.feature.FeatureVector
      extended by de.fu_berlin.ties.classify.feature.DefaultFeatureVector

public class DefaultFeatureVector
extends FeatureVector

This feature vector implementation stores an ordered sequence of features. Internally it uses an ArrayList as storage.

Instances of this class are not thread-safe and must be synchronized externally, if required.

Version:
$Revision: 1.2 $, $Date: 2004/09/06 17:22:10 $, $Author: siefkes $
Author:
Christian Siefkes

Constructor Summary
DefaultFeatureVector()
          Creates a new instance.
 
Method Summary
 void addAll(Collection coll)
          Adds all of the features in the specified Collection to this vector, in the order they are returned by the specified Collection's Iterator.
protected  Collection<Feature> store()
          Returns the collection used for storing the features.
 
Methods inherited from class de.fu_berlin.ties.classify.feature.FeatureVector
add, addAll, addAllTokens, flatten, flatten, getSummedStrength, iterator, preAddHook, setSummedStrength, size, strength, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DefaultFeatureVector

public DefaultFeatureVector()
Creates a new instance.

Method Detail

addAll

public void addAll(Collection coll)
            throws ClassCastException
Adds all of the features in the specified Collection to this vector, in the order they are returned by the specified Collection's Iterator.

Overrides:
addAll in class FeatureVector
Parameters:
coll - a collection of features to add
Throws:
ClassCastException - if the collection contains elements that are not Features

store

protected Collection<Feature> store()
Returns the collection used for storing the features. The properties of a feature vector depend on the kind of collection that is used.

Specified by:
store in class FeatureVector
Returns:
the collection used for storing the features.


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