public class Strand extends java.util.AbstractList<Nuc> implements INucGroup
Modifier and Type | Field and Description |
---|---|
(package private) int |
index |
(package private) int |
offset |
protected StrandList |
owner |
private RnaScene |
scene |
(package private) int |
size |
protected java.util.List<Nuc> |
source |
Constructor and Description |
---|
Strand(RnaScene scene,
StrandList owner,
int index,
java.util.List<Nuc> nucs,
int offset,
int size) |
Modifier and Type | Method and Description |
---|---|
Nuc |
add() |
void |
add(int index,
Nuc element) |
Nuc |
add(java.lang.String symbol) |
java.util.List<Nuc> |
addAll(java.lang.CharSequence sequence) |
boolean |
addAll(java.util.Collection<? extends Nuc> c) |
java.util.List<Nuc> |
addAll(int index,
java.lang.CharSequence sequence) |
boolean |
addAll(int index,
java.util.Collection<? extends Nuc> c) |
java.util.List<Nuc> |
addPlaceholders(int count) |
java.util.List<Nuc> |
addPlaceholders(int index,
int count) |
void |
clear() |
Nuc |
first() |
Nuc |
get(int index) |
java.util.Collection<Nuc> |
getBases()
Implements
INucGroup.getBases() |
(package private) int |
getEnd()
Get the scene index of the last nucleotide in this strand plus one.
|
int |
getIndex()
Get the index of this strand in the list of RnaScene strands.
|
Nuc |
getNext(Nuc nuc) |
Nuc |
getNext(Nuc nuc,
int steps) |
Nuc |
getNextInScene(Nuc nuc,
int steps,
boolean loopToBeginning)
Returns the next nucleotide after the specified one,
regardless of whether it is in this strand or another one.
|
Nuc |
getPrev(Nuc nuc) |
RnaScene |
getScene() |
int |
getSceneEnd()
Get the index (relative to all nucleotides in the scene) immediately AFTER last nucleotide in this Strand
|
int |
getSceneStart()
Get the index (relative to all nucleotides in the scene) of the first nucleotide in this Strand
|
java.util.Iterator<Nuc> |
iterator()
Returns an iterator over all Nucletotides in the group.
|
Nuc |
last() |
java.util.ListIterator<Nuc> |
listIterator(int startIndex) |
protected java.lang.String |
outOfBoundsMsg(int index) |
protected void |
rangeCheck(int index) |
protected void |
rangeCheckForAdd(int index) |
Nuc |
remove(int index) |
boolean |
removeAll(java.util.Collection<?> c) |
boolean |
retainAll(java.util.Collection<?> c) |
int |
sceneToStrandIndex(int nucIndexInScene) |
Nuc |
set(int index,
Nuc element) |
(package private) void |
setEnd(int end) |
int |
size() |
int |
strandToSceneIndex(int nucIndexInStrand) |
private java.lang.UnsupportedOperationException |
unsupported() |
add, equals, hashCode, indexOf, lastIndexOf, listIterator, removeRange, subList
contains, containsAll, isEmpty, remove, toArray, toArray, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
transformAll
int index
int offset
protected final StrandList owner
private RnaScene scene
int size
protected final java.util.List<Nuc> source
Strand(RnaScene scene, StrandList owner, int index, java.util.List<Nuc> nucs, int offset, int size)
public Nuc add()
public void add(int index, Nuc element)
public Nuc add(java.lang.String symbol)
public java.util.List<Nuc> addAll(java.lang.CharSequence sequence)
public boolean addAll(java.util.Collection<? extends Nuc> c)
public java.util.List<Nuc> addAll(int index, java.lang.CharSequence sequence)
public boolean addAll(int index, java.util.Collection<? extends Nuc> c)
public java.util.List<Nuc> addPlaceholders(int count)
public java.util.List<Nuc> addPlaceholders(int index, int count)
public void clear()
public Nuc first()
public Nuc get(int index)
public java.util.Collection<Nuc> getBases()
INucGroup.getBases()
int getEnd()
offset+size
public int getIndex()
public Nuc getNextInScene(Nuc nuc, int steps, boolean loopToBeginning)
public RnaScene getScene()
public int getSceneEnd()
public int getSceneStart()
public java.util.Iterator<Nuc> iterator()
INucGroup
iterator
in interface java.lang.Iterable<Nuc>
iterator
in interface java.util.Collection<Nuc>
iterator
in interface java.util.List<Nuc>
iterator
in interface INucGroup
iterator
in class java.util.AbstractList<Nuc>
public Nuc last()
public java.util.ListIterator<Nuc> listIterator(int startIndex)
protected java.lang.String outOfBoundsMsg(int index)
protected void rangeCheck(int index)
protected void rangeCheckForAdd(int index)
public Nuc remove(int index)
public boolean removeAll(java.util.Collection<?> c)
public boolean retainAll(java.util.Collection<?> c)
public int sceneToStrandIndex(int nucIndexInScene)
void setEnd(int end)
public int size()
public int strandToSceneIndex(int nucIndexInStrand)
private java.lang.UnsupportedOperationException unsupported()