com.io7m.jstructural.annotated

## Class SAPart

- java.lang.Object
- - com.io7m.jstructural.annotated.SAPart

- All Implemented Interfaces:
    SAIDTargetContent

      @Immutable
      public final class SAPart
      extends Object
      implements SAIDTargetContent

  A document part.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `SAPart(SAPartNumber in_number, com.io7m.jaux.functional.Option<String> in_type, com.io7m.jaux.functional.Option<SAID> in_id, SAPartTitle in_title, com.io7m.jaux.functional.Option<SPartContents> in_contents, SNonEmptyList<SASection> in_sections)` Construct a new 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<SAID>` | `getID()`
    `SAPartNumber` | `getNumber()`
    `com.io7m.jaux.functional.Option<SASection>` | `getSection(SASectionNumber n)` The section with the given number.
    `SNonEmptyList<SASection>` | `getSections()`
    `SAPartTitle` | `getTitle()`
    `com.io7m.jaux.functional.Option<String>` | `getType()`
    `int` | `hashCode()`
    `<T> T` | `targetContentAccept(SAIDTargetContentVisitor<T> v)` Accept an ID target content visitor.

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

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

- - ### Constructor Detail

    - #### SAPart

          public SAPart(@Nonnull
                SAPartNumber in_number,
                @Nonnull
                com.io7m.jaux.functional.Option<String> in_type,
                @Nonnull
                com.io7m.jaux.functional.Option<SAID> in_id,
                @Nonnull
                SAPartTitle in_title,
                @Nonnull
                com.io7m.jaux.functional.Option<SPartContents> in_contents,
                @Nonnull
                SNonEmptyList<SASection> in_sections)
                 throws com.io7m.jaux.Constraints.ConstraintError

      Construct a new part.
      Parameters:
        `in_number` - The part number
        `in_type` - The type attribute
        `in_id` - The part ID
        `in_title` - The part title
        `in_contents` - The table of contents
        `in_sections` - The sections
      Throws:
        `com.io7m.jaux.Constraints.ConstraintError` - If any parameter is `null`

  - ### Method Detail

    - #### 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<SAID> getID()

      Returns:
        The part ID

    - #### getNumber

          @Nonnull
          public SAPartNumber getNumber()

      Returns:
        The part number

    - #### getSection

          @Nonnull
          public com.io7m.jaux.functional.Option<SASection> getSection(@Nonnull
                                                                      SASectionNumber n)
                                                                throws com.io7m.jaux.Constraints.ConstraintError

      The section with the given number.
      Parameters:
        `n` - The number
      Returns:
        The section, if any
      Throws:
        `com.io7m.jaux.Constraints.ConstraintError` - If any parameter is `null`

    - #### getSections

          @Nonnull
          public SNonEmptyList<SASection> getSections()

      Returns:
        The part sections

    - #### getTitle

          @Nonnull
          public SAPartTitle 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`

    - #### targetContentAccept

          public <T> T targetContentAccept(SAIDTargetContentVisitor<T> v)
                                throws com.io7m.jaux.Constraints.ConstraintError,
                                       Exception

      Description copied from interface: `SAIDTargetContent`
      Accept an ID target content visitor.
      Specified by:
        `targetContentAccept` in interface `SAIDTargetContent`
      Type Parameters:
        `T` - The type of values returned by the visitor
      Parameters:
        `v` - The visitor
      Returns:
        The value returned by the visitor.
      Throws:
        `com.io7m.jaux.Constraints.ConstraintError` - If the visitor raises a `Constraints.ConstraintError`
        `Exception` - If the visitor raises and `Exception`

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