org.biojava.bio.seq.io
Class SymbolListCharSequence
java.lang.Object
org.biojava.bio.seq.io.SymbolListCharSequence
- All Implemented Interfaces:
- java.lang.CharSequence
public class SymbolListCharSequence
- extends java.lang.Object
- implements java.lang.CharSequence
SymbolListCharSequence
is a CharSequence
implementation which wraps a SymbolList
. It is present
primarily to support regular expression matching over
SymbolList
s as it avoids creating a copy.
- Since:
- 1.3
- Author:
- Keith James, Matthew Pocock
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
SymbolListCharSequence
public SymbolListCharSequence(SymbolList syms)
- Creates a new
SymbolListCharSequence
wrapping a
SymbolList
.
- Parameters:
syms
- a SymbolList
.
charAt
public char charAt(int index)
- Specified by:
charAt
in interface java.lang.CharSequence
length
public int length()
- Specified by:
length
in interface java.lang.CharSequence
subSequence
public java.lang.CharSequence subSequence(int start,
int end)
- Specified by:
subSequence
in interface java.lang.CharSequence
toString
public java.lang.String toString()
- Specified by:
toString
in interface java.lang.CharSequence
- Overrides:
toString
in class java.lang.Object