com.io7m.jstructural.annotated

## Class SADocumentWithSections

- java.lang.Object
- - com.io7m.jstructural.annotated.SADocument
  - - com.io7m.jstructural.annotated.SADocumentWithSections

- All Implemented Interfaces:
    SASegmentsReadable

      @Immutable
      public final class SADocumentWithSections
      extends SADocument

  A document with sections.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `SADocumentWithSections(SAIDMap in_ids, SADocumentTitle in_title, com.io7m.jfunctional.OptionType<SDocumentContents> in_contents, com.io7m.jfunctional.OptionType<SDocumentStyle> in_style, SNonEmptyList<SASection> in_content, List<SAFootnote> in_footnotes, SAFormalItemsByKind in_formals)` Construct a new document with sections.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `<A> A` | `documentAccept(SADocumentVisitor<A> v)` Accept a document visitor.
    `boolean` | `equals(Object obj)`
    `com.io7m.jfunctional.OptionType<SASection>` | `getSection(SASectionNumber n)`
    `SNonEmptyList<SASection>` | `getSections()`
    `int` | `hashCode()`
    `SASegmentNumber` | `segmentGetFirst()`
    `com.io7m.jfunctional.OptionType<SASegmentNumber>` | `segmentGetNext(SASegmentNumber n)`
    `com.io7m.jfunctional.OptionType<SASegmentNumber>` | `segmentGetPrevious(SASegmentNumber n)`
    `com.io7m.jfunctional.OptionType<SASegmentNumber>` | `segmentGetUp(SASegmentNumber n)`

    - ### Methods inherited from class com.io7m.jstructural.annotated.SADocument

      `getContents, getFootnotes, getFormals, getIDMappings, getStyle, getTitle`

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

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

- - ### Constructor Detail

    - #### SADocumentWithSections

          public SADocumentWithSections(SAIDMap in_ids,
                                        SADocumentTitle in_title,
                                        com.io7m.jfunctional.OptionType<SDocumentContents> in_contents,
                                        com.io7m.jfunctional.OptionType<SDocumentStyle> in_style,
                                        SNonEmptyList<SASection> in_content,
                                        List<SAFootnote> in_footnotes,
                                        SAFormalItemsByKind in_formals)

      Construct a new document with sections.
      Parameters:
        `in_ids` - The set of mappings from IDs to elements
        `in_title` - The title
        `in_contents` - Whether or not the document has a table of contents
        `in_style` - The style
        `in_content` - The list of sections
        `in_footnotes` - The list of footnotes
        `in_formals` - The formal items

  - ### Method Detail

    - #### documentAccept

          public <A> A documentAccept(SADocumentVisitor<A> v)
                               throws Exception

      Description copied from class: `SADocument`
      Accept a document visitor.
      Specified by:
        `documentAccept` in class `SADocument`
      Type Parameters:
        `A` - The type of values returned by the visitor
      Parameters:
        `v` - The visitor
      Returns:
        The value returned by the visitor
      Throws:
        `Exception` - If the visitor raises an `Exception`

    - #### equals

          public boolean equals(@Nullable
                                Object obj)

      Overrides:
        `equals` in class `SADocument`

    - #### getSection

          public com.io7m.jfunctional.OptionType<SASection> getSection(SASectionNumber n)

      Specified by:
        `getSection` in class `SADocument`
      Parameters:
        `n` - The section number
      Returns:
        The section with the given section number, if any.

    - #### getSections

          public SNonEmptyList<SASection> getSections()

      Returns:
        The document sections

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `SADocument`

    - #### segmentGetFirst

          public SASegmentNumber segmentGetFirst()

      Returns:
        The number of the first segment

    - #### segmentGetNext

          public com.io7m.jfunctional.OptionType<SASegmentNumber> segmentGetNext(SASegmentNumber n)

      Parameters:
        `n` - The current segment
      Returns:
        The number of the next segment (if any)

    - #### segmentGetPrevious

          public com.io7m.jfunctional.OptionType<SASegmentNumber> segmentGetPrevious(SASegmentNumber n)

      Parameters:
        `n` - The current segment
      Returns:
        The number of the previous segment (if any)

    - #### segmentGetUp

          public com.io7m.jfunctional.OptionType<SASegmentNumber> segmentGetUp(SASegmentNumber n)

      Parameters:
        `n` - The current segment
      Returns:
        The number of the parent segment (if any)

Copyright © 2015 <code@io7m.com> http://io7m.com