com.io7m.jstructural.core

## Class SDocumentWithParts

- java.lang.Object
- - com.io7m.jstructural.core.SDocument
  - - com.io7m.jstructural.core.SDocumentWithParts

-     public final class SDocumentWithParts
      extends SDocument

  A document with parts.

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static SDocumentWithParts` | `document(SDocumentTitle in_title, SNonEmptyList<SPart> in_content)` Construct a new document with the given title, and style.
    `<D> D` | `documentAccept(SDocumentVisitor<D> v)` Accept a document visitor.
    `static SDocumentWithParts` | `documentContents(SDocumentTitle in_title, SNonEmptyList<SPart> in_content)` Construct a new document with the given title, and table of contents.
    `static SDocumentWithParts` | `documentStyle(SDocumentTitle in_title, SDocumentStyle in_style, SNonEmptyList<SPart> in_content)` Construct a new document with the given title.
    `static SDocumentWithParts` | `documentStyleContents(SDocumentTitle in_title, SDocumentStyle in_style, SNonEmptyList<SPart> in_content)` Construct a new document with the given title, style, and table of contents.
    `boolean` | `equals(Object obj)`
    `SNonEmptyList<SPart>` | `getParts()`
    `int` | `hashCode()`

    - ### Methods inherited from class com.io7m.jstructural.core.SDocument

      `getContents, getStyle, getTitle`

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

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

- - ### Method Detail

    - #### document

          @Nonnull
          public static SDocumentWithParts document(@Nonnull
                                            SDocumentTitle in_title,
                                            @Nonnull
                                            SNonEmptyList<SPart> in_content)
                                             throws com.io7m.jaux.Constraints.ConstraintError

      Construct a new document with the given title, and style.
      Parameters:
        `in_title` - The title
        `in_content` - The sections
      Returns:
        A new document
      Throws:
        `com.io7m.jaux.Constraints.ConstraintError` - If any parameter is `null`

    - #### documentContents

          @Nonnull
          public static SDocumentWithParts documentContents(@Nonnull
                                                    SDocumentTitle in_title,
                                                    @Nonnull
                                                    SNonEmptyList<SPart> in_content)
                                                     throws com.io7m.jaux.Constraints.ConstraintError

      Construct a new document with the given title, and table of contents.
      Parameters:
        `in_title` - The title
        `in_content` - The sections
      Returns:
        A new document
      Throws:
        `com.io7m.jaux.Constraints.ConstraintError` - If any parameter is `null`

    - #### documentStyle

          @Nonnull
          public static SDocumentWithParts documentStyle(@Nonnull
                                                 SDocumentTitle in_title,
                                                 @Nonnull
                                                 SDocumentStyle in_style,
                                                 @Nonnull
                                                 SNonEmptyList<SPart> in_content)
                                                  throws com.io7m.jaux.Constraints.ConstraintError

      Construct a new document with the given title.
      Parameters:
        `in_title` - The title
        `in_style` - The style
        `in_content` - The sections
      Returns:
        A new document
      Throws:
        `com.io7m.jaux.Constraints.ConstraintError` - If any parameter is `null`

    - #### documentStyleContents

          @Nonnull
          public static SDocumentWithParts documentStyleContents(@Nonnull
                                                         SDocumentTitle in_title,
                                                         @Nonnull
                                                         SDocumentStyle in_style,
                                                         @Nonnull
                                                         SNonEmptyList<SPart> in_content)
                                                          throws com.io7m.jaux.Constraints.ConstraintError

      Construct a new document with the given title, style, and table of contents.
      Parameters:
        `in_title` - The title
        `in_style` - The style
        `in_content` - The sections
      Returns:
        A new document
      Throws:
        `com.io7m.jaux.Constraints.ConstraintError` - If any parameter is `null`

    - #### documentAccept

          public <D> D documentAccept(@Nonnull
                             SDocumentVisitor<D> v)
                           throws com.io7m.jaux.Constraints.ConstraintError,
                                  Exception

      Description copied from class: `SDocument`
      Accept a document visitor.
      Specified by:
        `documentAccept` in class `SDocument`
      Type Parameters:
        `D` - The type of transformed `SDocument`s
      Parameters:
        `v` - The visitor
      Returns:
        The value returned by the visitor
      Throws:
        `com.io7m.jaux.Constraints.ConstraintError` - If the visitor raises `Constraints.ConstraintError`
        `Exception` - If the visitor raises an `Exception`

    - #### equals

          public boolean equals(Object obj)

      Overrides:
        `equals` in class `SDocument`

    - #### getParts

          @Nonnull
          public SNonEmptyList<SPart> getParts()

      Returns:
        The document sections

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `SDocument`

Copyright © 2014. All rights reserved.