org.biojava.bio.seq
Class SimpleFeatureHolder

java.lang.Object
  |
  +--org.biojava.bio.seq.AbstractFeatureHolder
        |
        +--org.biojava.bio.seq.SimpleFeatureHolder

public class SimpleFeatureHolder
extends AbstractFeatureHolder

A no-frills implementation of FeatureHolder.

Author:
Matthew Pocock

Constructor Summary
SimpleFeatureHolder()
           
 
Method Summary
 void addFeature(Feature f)
          Add a feature to the featureholder
 int countFeatures()
          Count how many features are contained.
 java.util.Iterator features()
          Iterate over the features in no well defined order.
protected  java.util.List getFeatures()
          Returns the list of features in this featureholder.
 void removeFeature(Feature f)
          Remove a feature from this FeatureHolder.
 
Methods inherited from class org.biojava.bio.seq.AbstractFeatureHolder
createFeature, filter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleFeatureHolder

public SimpleFeatureHolder()
Method Detail

getFeatures

protected java.util.List getFeatures()
Returns the list of features in this featureholder.

countFeatures

public int countFeatures()
Description copied from interface: FeatureHolder
Count how many features are contained.
Tags copied from interface: FeatureHolder
Returns:
a positive integer or zero, equal to the number of features contained

features

public java.util.Iterator features()
Description copied from interface: FeatureHolder
Iterate over the features in no well defined order.
Tags copied from interface: FeatureHolder
Returns:
an Iterator

addFeature

public void addFeature(Feature f)
Add a feature to the featureholder

removeFeature

public void removeFeature(Feature f)
Description copied from interface: FeatureHolder
Remove a feature from this FeatureHolder.
Overrides:
removeFeature in class AbstractFeatureHolder
Tags copied from interface: FeatureHolder
Throws:
java.lang.UnsupportedOperationException - if this FeatureHolder does not support feature removal.