de.jstacs.io
Class InfixStringExtractor

java.lang.Object
  extended by de.jstacs.io.AbstractStringExtractor
      extended by de.jstacs.io.InfixStringExtractor
All Implemented Interfaces:
Enumeration<String>

public class InfixStringExtractor
extends AbstractStringExtractor

This class implements an AbstractStringExtractor that can be seen as a filter. Each instance only returns an infix instead of the full String.

Author:
Jens Keilwagen

Field Summary
 
Fields inherited from class de.jstacs.io.AbstractStringExtractor
annotation, FASTA, ignore, ignorePattern, USUALLY
 
Constructor Summary
InfixStringExtractor(AbstractStringExtractor se, int start, int length)
          This constructor creates an instance that uses only a infix of the string returned by se.
 
Method Summary
 SequenceAnnotation[] getCurrentSequenceAnnotations()
          Returns the SequenceAnnotation or null if no SequenceAnnotation is available.
 boolean hasMoreElements()
           
 String nextElement()
           
 
Methods inherited from class de.jstacs.io.AbstractStringExtractor
getAnnotation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InfixStringExtractor

public InfixStringExtractor(AbstractStringExtractor se,
                            int start,
                            int length)
This constructor creates an instance that uses only a infix of the string returned by se.

Parameters:
se - the main AbstractStringExtractor returned the full Strings
start - the start position of the infix
length - the length of the infix
Method Detail

hasMoreElements

public boolean hasMoreElements()

nextElement

public String nextElement()

getCurrentSequenceAnnotations

public SequenceAnnotation[] getCurrentSequenceAnnotations()
Description copied from class: AbstractStringExtractor
Returns the SequenceAnnotation or null if no SequenceAnnotation is available.

Overrides:
getCurrentSequenceAnnotations in class AbstractStringExtractor
Returns:
the SequenceAnnotation or null if no SequenceAnnotation is available.