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.jfunctional.OptionType<String> in_type, com.io7m.jfunctional.OptionType<SAID> in_id, SAPartTitle in_title, com.io7m.jfunctional.OptionType<SPartContents> in_contents, SNonEmptyList<SASection> in_sections)` Construct a new part.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(Object obj)`
    `com.io7m.jfunctional.OptionType<SPartContents>` | `getContents()`
    `com.io7m.jfunctional.OptionType<SAID>` | `getID()`
    `SAPartNumber` | `getNumber()`
    `com.io7m.jfunctional.OptionType<SASection>` | `getSection(SASectionNumber n)` The section with the given number.
    `SNonEmptyList<SASection>` | `getSections()`
    `SAPartTitle` | `getTitle()`
    `com.io7m.jfunctional.OptionType<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(SAPartNumber in_number,
                        com.io7m.jfunctional.OptionType<String> in_type,
                        com.io7m.jfunctional.OptionType<SAID> in_id,
                        SAPartTitle in_title,
                        com.io7m.jfunctional.OptionType<SPartContents> in_contents,
                        SNonEmptyList<SASection> in_sections)

      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

  - ### Method Detail

    - #### equals

          public boolean equals(@Nullable
                                Object obj)

      Overrides:
        `equals` in class `Object`

    - #### getContents

          public com.io7m.jfunctional.OptionType<SPartContents> getContents()

      Returns:
        The part's table of contents

    - #### getID

          public com.io7m.jfunctional.OptionType<SAID> getID()

      Returns:
        The part ID

    - #### getNumber

          public SAPartNumber getNumber()

      Returns:
        The part number

    - #### getSection

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

      The section with the given number.
      Parameters:
        `n` - The number
      Returns:
        The section, if any

    - #### getSections

          public SNonEmptyList<SASection> getSections()

      Returns:
        The part sections

    - #### getTitle

          public SAPartTitle getTitle()

      Returns:
        The part's title

    - #### getType

          public com.io7m.jfunctional.OptionType<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 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:
        `Exception` - If the visitor raises and `Exception`

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