Package org.biojava.bio.seq
Class FilterUtils.DelegatingTransformer
- java.lang.Object
-
- org.biojava.bio.seq.FilterUtils.DelegatingTransformer
-
- All Implemented Interfaces:
FilterUtils.FilterTransformer
- Enclosing class:
- FilterUtils
public class FilterUtils.DelegatingTransformer extends Object implements FilterUtils.FilterTransformer
An implementation of FilterTransformer that attempts to transform by one transformer, and if that fails, by another.- Author:
- Matthew Pocock
-
-
Constructor Summary
Constructors Constructor Description DelegatingTransformer(FilterUtils.FilterTransformer t1, FilterUtils.FilterTransformer t2)
Create a new DelegatingTransformer that will apply t1 and then t2 if t1 fails.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FeatureFilter
transform(FeatureFilter ff)
Transform a filter, or return null if it can not be transformed.
-
-
-
Constructor Detail
-
DelegatingTransformer
public DelegatingTransformer(FilterUtils.FilterTransformer t1, FilterUtils.FilterTransformer t2)
Create a new DelegatingTransformer that will apply t1 and then t2 if t1 fails.- Parameters:
t1
- the first FilterTransformer to tryt2
- the seccond FilterTransformer to try
-
-
Method Detail
-
transform
public FeatureFilter transform(FeatureFilter ff)
Description copied from interface:FilterUtils.FilterTransformer
Transform a filter, or return null if it can not be transformed.- Specified by:
transform
in interfaceFilterUtils.FilterTransformer
- Parameters:
ff
- the FeatureFilter to attempt to transform- Returns:
- a transformed filter, or null
-
-