ur_rna.StructureEditor.models

## Class Motif.Segment

- java.lang.Object
- - ur_rna.StructureEditor.models.Motif.Segment

- All Implemented Interfaces:
    java.lang.Iterable<Nuc>, INucGroup
  Direct Known Subclasses:
    Motif.Domain, Motif.Loop
  Enclosing class:
    Motif

      public static class Motif.Segment
      extends java.lang.Object
      implements INucGroup

  Represents a contiguous section of an RNA strand. Note that in a Segment, the Nucs 'start' and 'end' are not necessarily in order (5' to 3' respectively) (However for derived types, such as a Loop or Branch, start is always the 5'-most Nuc and end is always the 3'-most Nuc.)

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `Nuc` | `end` The end of the segment (the 3' side)
    `Nuc` | `start` The start of the segment (the 5' side)

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Segment()`
    `Segment(Nuc start, int length)`
    `Segment(Nuc start, Nuc end)`
    `Segment(Strand s, int start, int end)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.util.Collection<Nuc>` | `getBases()` Get a set of all nucleotides included in the group.
    `Nuc` | `getNuc3()`
    `Nuc` | `getNuc5()`
    `Nuc` | `getNucAt(int pos)`
    `void` | `orderNucs()`
    `int` | `size()` Get the number of nucleotides in the loop.
    `void` | `swapNucs()`

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

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface ur_rna.StructureEditor.models.INucGroup

      `iterator, transformAll`

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

      `forEach, spliterator`

- - ### Field Detail

    - #### end

          public Nuc end

      The end of the segment (the 3' side)

    - #### start

          public Nuc start

      The start of the segment (the 5' side)

  - ### Constructor Detail

    - #### Segment

          public Segment()

    - #### Segment

          public Segment(Nuc start,
                         int length)

    - #### Segment

          public Segment(Nuc start,
                         Nuc end)

    - #### Segment

          public Segment(Strand s,
                         int start,
                         int end)

  - ### Method Detail

    - #### getBases

          public java.util.Collection<Nuc> getBases()

      Get a set of all nucleotides included in the group.
      Specified by:
        `getBases` in interface `INucGroup`
      Returns:
        a Collection of nucleotides.

    - #### getNuc3

          public Nuc getNuc3()

    - #### getNuc5

          public Nuc getNuc5()

    - #### getNucAt

          public Nuc getNucAt(int pos)

    - #### orderNucs

          public void orderNucs()

    - #### size

          public int size()

      Get the number of nucleotides in the loop.

    - #### swapNucs

          public void swapNucs()