com.io7m.jstructural.core

## Class SParagraph

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

- All Implemented Interfaces:
    SSubsectionContent

      @Immutable
      public final class SParagraph
      extends Object
      implements SSubsectionContent

  A paragraph element.

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(Object obj)`
    `SNonEmptyList<SParagraphContent>` | `getContent()`
    `com.io7m.jaux.functional.Option<SID>` | `getID()`
    `com.io7m.jaux.functional.Option<String>` | `getType()`
    `int` | `hashCode()`
    `static SParagraph` | `paragraph(SNonEmptyList<SParagraphContent> content)` Construct a new paragraph.
    `static SParagraph` | `paragraphID(SID id, SNonEmptyList<SParagraphContent> content)` Construct a new paragraph with an ID.
    `static SParagraph` | `paragraphTyped(String type, SNonEmptyList<SParagraphContent> content)` Construct a new paragraph with a type attribute.
    `static SParagraph` | `paragraphTypedID(String type, SID id, SNonEmptyList<SParagraphContent> content)` Construct a new paragraph with an ID and type attribute.
    `<A> A` | `subsectionContentAccept(SSubsectionContentVisitor<A> v)` Accept a section content visitor.
    `String` | `toString()`

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

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

- - ### Method Detail

    - #### paragraph

          @Nonnull
          public static SParagraph paragraph(@Nonnull
                                     SNonEmptyList<SParagraphContent> content)
                                      throws com.io7m.jaux.Constraints.ConstraintError

      Construct a new paragraph.
      Parameters:
        `content` - The paragraph content.
      Returns:
        A new paragraph
      Throws:
        `com.io7m.jaux.Constraints.ConstraintError` - If any parameter is `null`

    - #### paragraphID

          @Nonnull
          public static SParagraph paragraphID(@Nonnull
                                       SID id,
                                       @Nonnull
                                       SNonEmptyList<SParagraphContent> content)
                                        throws com.io7m.jaux.Constraints.ConstraintError

      Construct a new paragraph with an ID.
      Parameters:
        `id` - The ID
        `content` - The paragraph content.
      Returns:
        A new paragraph
      Throws:
        `com.io7m.jaux.Constraints.ConstraintError` - If any parameter is `null`

    - #### paragraphTyped

          @Nonnull
          public static SParagraph paragraphTyped(@Nonnull
                                          String type,
                                          @Nonnull
                                          SNonEmptyList<SParagraphContent> content)
                                           throws com.io7m.jaux.Constraints.ConstraintError

      Construct a new paragraph with a type attribute.
      Parameters:
        `type` - The type attribute
        `content` - The paragraph content.
      Returns:
        A new paragraph
      Throws:
        `com.io7m.jaux.Constraints.ConstraintError` - If any parameter is `null`

    - #### paragraphTypedID

          @Nonnull
          public static SParagraph paragraphTypedID(@Nonnull
                                            String type,
                                            @Nonnull
                                            SID id,
                                            @Nonnull
                                            SNonEmptyList<SParagraphContent> content)
                                             throws com.io7m.jaux.Constraints.ConstraintError

      Construct a new paragraph with an ID and type attribute.
      Parameters:
        `type` - The type attribute
        `id` - The ID
        `content` - The paragraph content.
      Returns:
        A new paragraph
      Throws:
        `com.io7m.jaux.Constraints.ConstraintError` - If any parameter is `null`

    - #### equals

          public boolean equals(Object obj)

      Overrides:
        `equals` in class `Object`

    - #### getContent

          @Nonnull
          public SNonEmptyList<SParagraphContent> getContent()

      Returns:
        The element content

    - #### getID

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

      Returns:
        The paragraph's ID.

    - #### getType

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

      Returns:
        The type attribute

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

    - #### subsectionContentAccept

          public <A> A subsectionContentAccept(@Nonnull
                                      SSubsectionContentVisitor<A> v)
                                    throws com.io7m.jaux.Constraints.ConstraintError,
                                           Exception

      Description copied from interface: `SSubsectionContent`
      Accept a section content visitor.
      Specified by:
        `subsectionContentAccept` in interface `SSubsectionContent`
      Type Parameters:
        `A` - 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`

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

Copyright © 2014. All rights reserved.