org.biojava.bio.seq
Interface FeatureFilter

All Known Implementing Classes:
FeatureFilter.AcceptAllFilter, FeatureFilter.ByType, FeatureFilter.BySource, FeatureFilter.ContainedByLocation, FeatureFilter.OverlapsLocation, FeatureFilter.Not, FeatureFilter.And, FeatureFilter.Or

public interface FeatureFilter
extends java.io.Serializable

A filter for accepting or rejecting a feature.

This may implement arbitrary rules, or be based upon the feature's annotation, type, location or source.

If the filter is to be used in a remote process, it is recognized that it may be serialized and sent over to run remotely, rather than each feature being retrieved localy.

Author:
Matthew Pocock, Thomas Down

Inner Class Summary
static class FeatureFilter.AcceptAllFilter
          The class that accepts all features.
static class FeatureFilter.And
          A filter that returns all features accepted by both child filter.
static class FeatureFilter.BySource
          Construct one of these to filter features by source.
static class FeatureFilter.ByType
          Construct one of these to filter features by type.
static class FeatureFilter.ContainedByLocation
          A filter that returns all features contained within a location.
static class FeatureFilter.Not
          A filter that returns all features not accepted by a child filter.
static class FeatureFilter.Or
          A filter that returns all features accepted by at least one child filter.
static class FeatureFilter.OverlapsLocation
          A filter that returns all features overlapping a location.
 
Field Summary
static FeatureFilter all
          All features are selected in with this filter.
 
Method Summary
 boolean accept(Feature f)
          This method determines whether a fetaure is to be accepted.
 

Field Detail

all

public static final FeatureFilter all
All features are selected in with this filter.
Method Detail

accept

public boolean accept(Feature f)
This method determines whether a fetaure is to be accepted.
Parameters:
f - the Feature to evaluate
Returns:
true if this feature is to be selected in, or false if it is to be ignored