ur_rna.StructureEditor.models

## Class StrandList

- java.lang.Object
- - java.util.AbstractCollection<E>
  - - java.util.AbstractList<Strand>
    - - ur_rna.StructureEditor.models.StrandList

- All Implemented Interfaces:
    java.lang.Iterable<Strand>, java.util.Collection<Strand>, java.util.List<Strand>

      public class StrandList
      extends java.util.AbstractList<Strand>

  A list of `Strand` that coordinates strand divisions etc to ensure the segmentation of nucleotides is consistent.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `private int` | `lowestUpdateNucIndex`
    `(package private) static int` | `NO_REINDEX`
    `private java.util.List<Nuc>` | `nucs`
    `(package private) java.util.List<Strand>` | `others`
    `private java.util.List<Nuc>` | `readOnlyNucs`
    `(package private) Strand` | `s1`
    `(package private) Strand` | `s2`
    `private RnaScene` | `scene`
    `(package private) int` | `size`
    `private int` | `suppressUpdateCounter`

    - ### Fields inherited from class java.util.AbstractList

      `modCount`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `StrandList(RnaScene scene, java.util.List<Nuc> nucs)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `Strand` | `add()`
    `Strand` | `add(int insertAtIndex)`
    `void` | `add(int index, Strand element)` Deprecated.
    `boolean` | `add(Strand strand)` Deprecated.
    `boolean` | `addAll(java.util.Collection<? extends Strand> c)` Deprecated.
    `boolean` | `addAll(int index, java.util.Collection<? extends Strand> c)` Deprecated.
    `java.util.List<Nuc>` | `allNucs()` Returns a read-only list of all nucleotides.
    `void` | `clear()` Deprecated.
    `boolean` | `contains(java.lang.Object o)`
    `void` | `divideStrand(int strandIndex, int nucIndexInStrand)` Divides one strand into two separate strands.
    `void` | `divideStrand(Strand strand, int nucIndexInStrand)` Divides one strand into two separate strands.
    `Strand` | `first()`
    `Strand` | `get(int index)`
    `RnaScene` | `getScene()`
    `int` | `indexOf(java.lang.Object o)`
    `boolean` | `isEmpty()`
    `void` | `joinStrands(Strand s1, Strand s2)`
    `Strand` | `last()`
    `int` | `lastIndexOf(java.lang.Object o)`
    `private Strand` | `newStrand(int index)`
    `private Strand` | `newStrand(int index, int offset, int size)`
    `private java.lang.UnsupportedOperationException` | `noChangeError()`
    `private java.util.List<Strand>` | `others()`
    `private java.lang.String` | `outOfBoundsMsg(int index)`
    `private void` | `rangeCheck(int index)`
    `private void` | `reIndexNucs(int start)`
    `Strand` | `remove(int index)` Deprecated.
    `boolean` | `remove(java.lang.Object o)` Deprecated.
    `boolean` | `removeAll(java.util.Collection<?> c)` Deprecated.
    `Strand` | `removeDirect(int index)`
    `void` | `resumeUpdate()`
    `void` | `resumeUpdate(boolean performUpdate)`
    `boolean` | `retainAll(java.util.Collection<?> c)` Deprecated.
    `Strand` | `second()`
    `Strand` | `set(int index, Strand element)` Deprecated.
    `int` | `size()`
    `void` | `suspendUpdate()`
    `java.lang.Object[]` | `toArray()`
    `void` | `updateStrands(int updateNucIndex)`

    - ### Methods inherited from class java.util.AbstractList

      `equals, hashCode, iterator, listIterator, listIterator, removeRange, subList`

    - ### Methods inherited from class java.util.AbstractCollection

      `containsAll, toArray, toString`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface java.util.List

      `containsAll, replaceAll, sort, spliterator, toArray`

    - ### Methods inherited from interface java.util.Collection

      `parallelStream, removeIf, stream`

    - ### Methods inherited from interface java.lang.Iterable

      `forEach`

- - ### Field Detail

    - #### lowestUpdateNucIndex

          private int lowestUpdateNucIndex

    - #### NO_REINDEX

          static final int NO_REINDEX

      See Also:
        Constant Field Values

    - #### nucs

          private java.util.List<Nuc> nucs

    - #### others

          java.util.List<Strand> others

    - #### readOnlyNucs

          private java.util.List<Nuc> readOnlyNucs

    - #### s1

          Strand s1

    - #### s2

          Strand s2

    - #### scene

          private final RnaScene scene

    - #### size

          int size

    - #### suppressUpdateCounter

          private int suppressUpdateCounter

  - ### Constructor Detail

    - #### StrandList

          public StrandList(RnaScene scene,
                            java.util.List<Nuc> nucs)

  - ### Method Detail

    - #### add

          public Strand add()

    - #### add

          public Strand add(int insertAtIndex)

    - #### add

          @Deprecated
          public void add(int index,
                                       Strand element)

      Deprecated.
      Specified by:
        `add` in interface `java.util.List<Strand>`
      Overrides:
        `add` in class `java.util.AbstractList<Strand>`

    - #### add

          @Deprecated
          public boolean add(Strand strand)

      Deprecated.
      Specified by:
        `add` in interface `java.util.Collection<Strand>`
      Specified by:
        `add` in interface `java.util.List<Strand>`
      Overrides:
        `add` in class `java.util.AbstractList<Strand>`

    - #### addAll

          @Deprecated
          public boolean addAll(java.util.Collection<? extends Strand> c)

      Deprecated.
      Specified by:
        `addAll` in interface `java.util.Collection<Strand>`
      Specified by:
        `addAll` in interface `java.util.List<Strand>`
      Overrides:
        `addAll` in class `java.util.AbstractCollection<Strand>`

    - #### addAll

          @Deprecated
          public boolean addAll(int index,
                                             java.util.Collection<? extends Strand> c)

      Deprecated.
      Specified by:
        `addAll` in interface `java.util.List<Strand>`
      Overrides:
        `addAll` in class `java.util.AbstractList<Strand>`

    - #### allNucs

          public java.util.List<Nuc> allNucs()

      Returns a read-only list of all nucleotides.

    - #### clear

          @Deprecated
          public void clear()

      Deprecated.
      Specified by:
        `clear` in interface `java.util.Collection<Strand>`
      Specified by:
        `clear` in interface `java.util.List<Strand>`
      Overrides:
        `clear` in class `java.util.AbstractList<Strand>`

    - #### contains

          public boolean contains(java.lang.Object o)

      Specified by:
        `contains` in interface `java.util.Collection<Strand>`
      Specified by:
        `contains` in interface `java.util.List<Strand>`
      Overrides:
        `contains` in class `java.util.AbstractCollection<Strand>`

    - #### divideStrand

          public void divideStrand(int strandIndex,
                                   int nucIndexInStrand)

      Divides one strand into two separate strands. The division occurs immediately before nucIndexInStrand, so after the division, the Nuc at nucIndexInStrand-1 will be the last Nuc in Strand, while the Nuc previously at nucIndexInStrand will be the first Nuc in the newly created subsequent strand.

    - #### divideStrand

          public void divideStrand(Strand strand,
                                   int nucIndexInStrand)

      Divides one strand into two separate strands. The division occurs immediately before nucIndexInStrand, so after the division, the Nuc at nucIndexInStrand-1 will be the last Nuc in Strand, while the Nuc previously at nucIndexInStrand will be the first Nuc in the newly created subsequent strand.

    - #### first

          public Strand first()

    - #### get

          public Strand get(int index)

      Specified by:
        `get` in interface `java.util.List<Strand>`
      Specified by:
        `get` in class `java.util.AbstractList<Strand>`

    - #### getScene

          public RnaScene getScene()

    - #### indexOf

          public int indexOf(java.lang.Object o)

      Specified by:
        `indexOf` in interface `java.util.List<Strand>`
      Overrides:
        `indexOf` in class `java.util.AbstractList<Strand>`

    - #### isEmpty

          public boolean isEmpty()

      Specified by:
        `isEmpty` in interface `java.util.Collection<Strand>`
      Specified by:
        `isEmpty` in interface `java.util.List<Strand>`
      Overrides:
        `isEmpty` in class `java.util.AbstractCollection<Strand>`

    - #### joinStrands

          public void joinStrands(Strand s1,
                                  Strand s2)

    - #### last

          public Strand last()

    - #### lastIndexOf

          public int lastIndexOf(java.lang.Object o)

      Specified by:
        `lastIndexOf` in interface `java.util.List<Strand>`
      Overrides:
        `lastIndexOf` in class `java.util.AbstractList<Strand>`

    - #### newStrand

          private Strand newStrand(int index)

    - #### newStrand

          private Strand newStrand(int index,
                                   int offset,
                                   int size)

    - #### noChangeError

          private java.lang.UnsupportedOperationException noChangeError()

    - #### others

          private java.util.List<Strand> others()

    - #### outOfBoundsMsg

          private java.lang.String outOfBoundsMsg(int index)

    - #### rangeCheck

          private void rangeCheck(int index)

    - #### reIndexNucs

          private void reIndexNucs(int start)

    - #### remove

          @Deprecated
          public Strand remove(int index)

      Deprecated.
      Specified by:
        `remove` in interface `java.util.List<Strand>`
      Overrides:
        `remove` in class `java.util.AbstractList<Strand>`

    - #### remove

          @Deprecated
          public boolean remove(java.lang.Object o)

      Deprecated.
      Specified by:
        `remove` in interface `java.util.Collection<Strand>`
      Specified by:
        `remove` in interface `java.util.List<Strand>`
      Overrides:
        `remove` in class `java.util.AbstractCollection<Strand>`

    - #### removeAll

          @Deprecated
          public boolean removeAll(java.util.Collection<?> c)

      Deprecated.
      Specified by:
        `removeAll` in interface `java.util.Collection<Strand>`
      Specified by:
        `removeAll` in interface `java.util.List<Strand>`
      Overrides:
        `removeAll` in class `java.util.AbstractCollection<Strand>`

    - #### removeDirect

          public Strand removeDirect(int index)

    - #### resumeUpdate

          public void resumeUpdate()

    - #### resumeUpdate

          public void resumeUpdate(boolean performUpdate)

    - #### retainAll

          @Deprecated
          public boolean retainAll(java.util.Collection<?> c)

      Deprecated.
      Specified by:
        `retainAll` in interface `java.util.Collection<Strand>`
      Specified by:
        `retainAll` in interface `java.util.List<Strand>`
      Overrides:
        `retainAll` in class `java.util.AbstractCollection<Strand>`

    - #### second

          public Strand second()

    - #### set

          @Deprecated
          public Strand set(int index,
                                         Strand element)

      Deprecated.
      Specified by:
        `set` in interface `java.util.List<Strand>`
      Overrides:
        `set` in class `java.util.AbstractList<Strand>`

    - #### size

          public int size()

      Specified by:
        `size` in interface `java.util.Collection<Strand>`
      Specified by:
        `size` in interface `java.util.List<Strand>`
      Specified by:
        `size` in class `java.util.AbstractCollection<Strand>`

    - #### suspendUpdate

          public void suspendUpdate()

    - #### toArray

          public java.lang.Object[] toArray()

      Specified by:
        `toArray` in interface `java.util.Collection<Strand>`
      Specified by:
        `toArray` in interface `java.util.List<Strand>`
      Overrides:
        `toArray` in class `java.util.AbstractCollection<Strand>`

    - #### updateStrands

          public void updateStrands(int updateNucIndex)