com.io7m.jstructural.annotated

## Class SASectionNumberPS

- java.lang.Object
- - com.io7m.jstructural.annotated.SASectionNumber
  - - com.io7m.jstructural.annotated.SASectionNumberPS

- All Implemented Interfaces:
    SASegmentNumber

      public final class SASectionNumberPS
      extends SASectionNumber

  A section number consisting of a part, and section.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `SASectionNumberPS(int in_part, int in_section)` Construct a new section number

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(Object obj)`
    `int` | `getPart()`
    `int` | `getSection()`
    `int` | `hashCode()`
    `<T> T` | `sectionNumberAccept(SASectionNumberVisitor<T> v)` Accept a section number visitor.
    `String` | `sectionNumberFormat()`
    `<T> T` | `segmentNumberAccept(SASegmentNumberVisitor<T> v)` Accept a segment number visitor.
    `String` | `toString()`

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

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

- - ### Constructor Detail

    - #### SASectionNumberPS

          public SASectionNumberPS(int in_part,
                           int in_section)
                            throws com.io7m.jaux.Constraints.ConstraintError

      Construct a new section number
      Parameters:
        `in_part` - The part number
        `in_section` - The section number
      Throws:
        `com.io7m.jaux.Constraints.ConstraintError` - If any parameter is outside of the range `[1, `Integer.MAX_VALUE`]`

  - ### Method Detail

    - #### equals

          public boolean equals(Object obj)

      Overrides:
        `equals` in class `Object`

    - #### getPart

          public int getPart()

      Returns:
        The part number

    - #### getSection

          public int getSection()

      Returns:
        The section number

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

    - #### sectionNumberAccept

          public <T> T sectionNumberAccept(@Nonnull
                                  SASectionNumberVisitor<T> v)
                                throws com.io7m.jaux.Constraints.ConstraintError,
                                       Exception

      Description copied from class: `SASectionNumber`
      Accept a section number visitor.
      Specified by:
        `sectionNumberAccept` in class `SASectionNumber`
      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 `Constraints.ConstraintError`
        `Exception` - If the visitor raises an `Exception`

    - #### sectionNumberFormat

          public String sectionNumberFormat()

      Specified by:
        `sectionNumberFormat` in class `SASectionNumber`
      Returns:
        A human-readable string representing the section number (such as "1.2")

    - #### segmentNumberAccept

          public <T> T segmentNumberAccept(@Nonnull
                                  SASegmentNumberVisitor<T> v)
                                throws com.io7m.jaux.Constraints.ConstraintError,
                                       Exception

      Description copied from interface: `SASegmentNumber`
      Accept a segment number visitor.
      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 `Constraints.ConstraintError`
        `Exception` - If the visitor raises an `Exception`

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

Copyright © 2014. All rights reserved.