public abstract class AbstractFeatureHolder extends AbstractChangeable implements FeatureHolder
FeatureHolder.EmptyFeatureHolder
EMPTY_FEATURE_HOLDER, FEATURES, SCHEMA
Constructor and Description |
---|
AbstractFeatureHolder() |
Modifier and Type | Method and Description |
---|---|
Feature |
createFeature(Feature.Template temp)
Create a new Feature, and add it to this FeatureHolder.
|
FeatureHolder |
filter(FeatureFilter filter)
Query this set of features using a supplied
FeatureFilter . |
FeatureHolder |
filter(FeatureFilter ff,
boolean recurse)
Return a new FeatureHolder that contains all of the children of this one
that passed the filter fc.
|
void |
removeFeature(Feature f)
Remove a feature from this FeatureHolder.
|
addChangeListener, addChangeListener, generateChangeSupport, getChangeSupport, hasListeners, hasListeners, isUnchanging, removeChangeListener, removeChangeListener
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
containsFeature, countFeatures, features, getSchema
addChangeListener, addChangeListener, isUnchanging, removeChangeListener, removeChangeListener
public AbstractFeatureHolder()
public FeatureHolder filter(FeatureFilter filter)
FeatureHolder
FeatureFilter
.filter
in interface FeatureHolder
filter
- the FeatureFilter
to apply.filter
.public FeatureHolder filter(FeatureFilter ff, boolean recurse)
FeatureHolder
filter
in interface FeatureHolder
ff
- the FeatureFilter to applyrecurse
- true if all features-of-features should be scanned, and a
single flat collection of features returned, or false if
just immediate children should be filtered.public Feature createFeature(Feature.Template temp) throws BioException, ChangeVetoException
FeatureHolder
createFeature
in interface FeatureHolder
BioException
- if something went wrong during creating the featureChangeVetoException
- if this FeatureHolder does not support
creation of new features, or if the change was vetoedpublic void removeFeature(Feature f) throws ChangeVetoException, BioException
FeatureHolder
removeFeature
in interface FeatureHolder
ChangeVetoException
- if this FeatureHolder does not support
feature removal or if the change was vetoedBioException
- if there was an error removing the featureCopyright © 2014 BioJava. All rights reserved.