com.io7m.jstructural.core

## Class SPart

- java.lang.Object
- - com.io7m.jstructural.core.SPart

-     @Immutable
      public final class SPart
      extends Object

  A document part.

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(Object obj)`
    `com.io7m.jaux.functional.Option<SPartContents>` | `getContents()`
    `com.io7m.jaux.functional.Option<SID>` | `getID()`
    `SNonEmptyList<SSection>` | `getSections()`
    `SPartTitle` | `getTitle()`
    `com.io7m.jaux.functional.Option<String>` | `getType()`
    `int` | `hashCode()`
    `static SPart` | `part(SPartTitle in_title, SNonEmptyList<SSection> in_sections)` Create a part with the given title and content.
    `static SPart` | `partID(SID id, SPartTitle in_title, SNonEmptyList<SSection> in_sections)` Create a part with the given id, title, and content.
    `static SPart` | `partTyped(String type, SPartTitle in_title, SNonEmptyList<SSection> in_sections)` Create a part with the given type, title, and content.
    `static SPart` | `partTypedID(String type, SID id, SPartTitle in_title, SNonEmptyList<SSection> in_sections)` Create a part with the given type, id, title, and content.
    `static SPart` | `partWithContents(SPartTitle in_title, SNonEmptyList<SSection> in_sections)` Create a part with the given title, content, and with a table of contents.
    `static SPart` | `partWithContentsID(SID id, SPartTitle in_title, SNonEmptyList<SSection> in_sections)` Create a part with the given id, title, content, and with a table of contents.
    `static SPart` | `partWithContentsTyped(String type, SPartTitle in_title, SNonEmptyList<SSection> in_sections)` Create a part with the given type, title, content, and with a table of contents.
    `static SPart` | `partWithContentsTypedID(String type, SID id, SPartTitle in_title, SNonEmptyList<SSection> in_sections)` Create a part with the given type, id, title, content, and with a table of contents.

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

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

- - ### Method Detail

    - #### part

          @Nonnull
          public static SPart part(@Nonnull
                           SPartTitle in_title,
                           @Nonnull
                           SNonEmptyList<SSection> in_sections)
                            throws com.io7m.jaux.Constraints.ConstraintError

      Create a part with the given title and content.
      Parameters:
        `in_title` - The title
        `in_sections` - The content
      Returns:
        A new part
      Throws:
        `com.io7m.jaux.Constraints.ConstraintError` - If any parameter is `null`

    - #### partID

          @Nonnull
          public static SPart partID(@Nonnull
                             SID id,
                             @Nonnull
                             SPartTitle in_title,
                             @Nonnull
                             SNonEmptyList<SSection> in_sections)
                              throws com.io7m.jaux.Constraints.ConstraintError

      Create a part with the given id, title, and content.
      Parameters:
        `id` - The ID
        `in_title` - The title
        `in_sections` - The content
      Returns:
        A new part
      Throws:
        `com.io7m.jaux.Constraints.ConstraintError` - If any parameter is `null`

    - #### partTyped

          @Nonnull
          public static SPart partTyped(@Nonnull
                                String type,
                                @Nonnull
                                SPartTitle in_title,
                                @Nonnull
                                SNonEmptyList<SSection> in_sections)
                                 throws com.io7m.jaux.Constraints.ConstraintError

      Create a part with the given type, title, and content.
      Parameters:
        `type` - The type
        `in_title` - The title
        `in_sections` - The content
      Returns:
        A new part
      Throws:
        `com.io7m.jaux.Constraints.ConstraintError` - If any parameter is `null`

    - #### partTypedID

          @Nonnull
          public static SPart partTypedID(@Nonnull
                                  String type,
                                  @Nonnull
                                  SID id,
                                  @Nonnull
                                  SPartTitle in_title,
                                  @Nonnull
                                  SNonEmptyList<SSection> in_sections)
                                   throws com.io7m.jaux.Constraints.ConstraintError

      Create a part with the given type, id, title, and content.
      Parameters:
        `type` - The type
        `id` - The ID
        `in_title` - The title
        `in_sections` - The content
      Returns:
        A new part
      Throws:
        `com.io7m.jaux.Constraints.ConstraintError` - If any parameter is `null`

    - #### partWithContents

          @Nonnull
          public static SPart partWithContents(@Nonnull
                                       SPartTitle in_title,
                                       @Nonnull
                                       SNonEmptyList<SSection> in_sections)
                                        throws com.io7m.jaux.Constraints.ConstraintError

      Create a part with the given title, content, and with a table of contents.
      Parameters:
        `in_title` - The title
        `in_sections` - The content
      Returns:
        A new part
      Throws:
        `com.io7m.jaux.Constraints.ConstraintError` - If any parameter is `null`

    - #### partWithContentsID

          @Nonnull
          public static SPart partWithContentsID(@Nonnull
                                         SID id,
                                         @Nonnull
                                         SPartTitle in_title,
                                         @Nonnull
                                         SNonEmptyList<SSection> in_sections)
                                          throws com.io7m.jaux.Constraints.ConstraintError

      Create a part with the given id, title, content, and with a table of contents.
      Parameters:
        `id` - The ID
        `in_title` - The title
        `in_sections` - The content
      Returns:
        A new part
      Throws:
        `com.io7m.jaux.Constraints.ConstraintError` - If any parameter is `null`

    - #### partWithContentsTyped

          @Nonnull
          public static SPart partWithContentsTyped(@Nonnull
                                            String type,
                                            @Nonnull
                                            SPartTitle in_title,
                                            @Nonnull
                                            SNonEmptyList<SSection> in_sections)
                                             throws com.io7m.jaux.Constraints.ConstraintError

      Create a part with the given type, title, content, and with a table of contents.
      Parameters:
        `type` - The type
        `in_title` - The title
        `in_sections` - The content
      Returns:
        A new part
      Throws:
        `com.io7m.jaux.Constraints.ConstraintError` - If any parameter is `null`

    - #### partWithContentsTypedID

          @Nonnull
          public static SPart partWithContentsTypedID(@Nonnull
                                              String type,
                                              @Nonnull
                                              SID id,
                                              @Nonnull
                                              SPartTitle in_title,
                                              @Nonnull
                                              SNonEmptyList<SSection> in_sections)
                                               throws com.io7m.jaux.Constraints.ConstraintError

      Create a part with the given type, id, title, content, and with a table of contents.
      Parameters:
        `type` - The type
        `id` - The ID
        `in_title` - The title
        `in_sections` - The content
      Returns:
        A new part
      Throws:
        `com.io7m.jaux.Constraints.ConstraintError` - If any parameter is `null`

    - #### equals

          public boolean equals(Object obj)

      Overrides:
        `equals` in class `Object`

    - #### getContents

          @Nonnull
          public com.io7m.jaux.functional.Option<SPartContents> getContents()

      Returns:
        The part's table of contents

    - #### getID

          @Nonnull
          public com.io7m.jaux.functional.Option<SID> getID()

      Returns:
        The part ID

    - #### getSections

          @Nonnull
          public SNonEmptyList<SSection> getSections()

      Returns:
        The part sections

    - #### getTitle

          @Nonnull
          public SPartTitle getTitle()

      Returns:
        The part's title

    - #### getType

          @Nonnull
          public com.io7m.jaux.functional.Option<String> getType()

      Returns:
        The part's type attribute

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

Copyright © 2014. All rights reserved.