com.io7m.jstructural.core

## Class SDocument

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

- Direct Known Subclasses:
    SDocumentWithParts, SDocumentWithSections

      public abstract class SDocument
      extends Object

  A document.

- - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `SDocument(SDocumentTitle in_title, com.io7m.jaux.functional.Option<SDocumentContents> in_contents, com.io7m.jaux.functional.Option<SDocumentStyle> in_style)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `abstract <D> D` | `documentAccept(SDocumentVisitor<D> v)` Accept a document visitor.
    `boolean` | `equals(Object obj)`
    `com.io7m.jaux.functional.Option<SDocumentContents>` | `getContents()`
    `com.io7m.jaux.functional.Option<SDocumentStyle>` | `getStyle()`
    `SDocumentTitle` | `getTitle()`
    `int` | `hashCode()`

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

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

- - ### Constructor Detail

    - #### SDocument

          protected SDocument(@Nonnull
                   SDocumentTitle in_title,
                   @Nonnull
                   com.io7m.jaux.functional.Option<SDocumentContents> in_contents,
                   @Nonnull
                   com.io7m.jaux.functional.Option<SDocumentStyle> in_style)
                       throws com.io7m.jaux.Constraints.ConstraintError

      Throws:
        `com.io7m.jaux.Constraints.ConstraintError`

  - ### Method Detail

    - #### documentAccept

          public abstract <D> D documentAccept(@Nonnull
                             SDocumentVisitor<D> v)
                                    throws com.io7m.jaux.Constraints.ConstraintError,
                                           Exception

      Accept a document visitor.
      Type Parameters:
        `D` - The type of transformed `SDocument`s
      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`

    - #### equals

          public boolean equals(Object obj)

      Overrides:
        `equals` in class `Object`

    - #### getContents

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

      Returns:
        The document contents

    - #### getStyle

          @Nonnull
          public final com.io7m.jaux.functional.Option<SDocumentStyle> getStyle()

      Returns:
        The document style

    - #### getTitle

          @Nonnull
          public final SDocumentTitle getTitle()

      Returns:
        The document title

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

Copyright © 2014. All rights reserved.