com.io7m.jstructural.annotated

## Class SADocumentWithParts

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

- All Implemented Interfaces:
    SASegmentsReadable

      public final class SADocumentWithParts
      extends SADocument

  A document with sections.

- - ### Constructor Summary

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

  - ### Method Summary

    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<SAPart>` | `getPart(SAPartNumber n)`
    `SNonEmptyList<SAPart>` | `getParts()`
    `com.io7m.jfunctional.OptionType<SASection>` | `getSection(SASectionNumber n)`
    `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

    - #### SADocumentWithParts

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

      Construct a new document with parts.
      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 parts
        `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`

    - #### getPart

          public com.io7m.jfunctional.OptionType<SAPart> getPart(SAPartNumber n)

      Parameters:
        `n` - The part number
      Returns:
        The part for the given part number, if any

    - #### getParts

          public SNonEmptyList<SAPart> getParts()

      Returns:
        The document sections

    - #### 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.

    - #### 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 © 2014 <code@io7m.com> http://io7m.com