com.io7m.jstructural.core

## Class SLink

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

- All Implemented Interfaces:
    SFootnoteContent, SListItemContent, SParagraphContent, STableCellContent

      @Immutable
      public final class SLink
      extends Object
      implements SParagraphContent, SListItemContent, SFootnoteContent, STableCellContent

  A link to an internal document element.

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(Object obj)`
    `<A> A` | `footnoteContentAccept(SFootnoteContentVisitor<A> v)` Accept a footnote content visitor.
    `SNonEmptyList<SLinkContent>` | `getContent()`
    `String` | `getTarget()`
    `int` | `hashCode()`
    `static SLink` | `link(String target, SNonEmptyList<SLinkContent> content)` Construct a new internal link element.
    `<A> A` | `listItemContentAccept(SListItemContentVisitor<A> v)` Accept a list item content visitor.
    `<A> A` | `paragraphContentAccept(SParagraphContentVisitor<A> v)` Accept a paragraph content visitor.
    `<A> A` | `tableCellContentAccept(STableCellContentVisitor<A> v)` Accept a table cell content visitor.

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

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

- - ### Method Detail

    - #### link

          @Nonnull
          public static SLink link(@Nonnull
                           String target,
                           @Nonnull
                           SNonEmptyList<SLinkContent> content)
                            throws com.io7m.jaux.Constraints.ConstraintError

      Construct a new internal link element.
      Parameters:
        `target` - The target
        `content` - The content in the body of the link
      Returns:
        A new link element
      Throws:
        `com.io7m.jaux.Constraints.ConstraintError` - If any parameter is `null`

    - #### equals

          public boolean equals(Object obj)

      Overrides:
        `equals` in class `Object`

    - #### footnoteContentAccept

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

      Description copied from interface: `SFootnoteContent`
      Accept a footnote content visitor.
      Specified by:
        `footnoteContentAccept` in interface `SFootnoteContent`
      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`

    - #### getContent

          @Nonnull
          public SNonEmptyList<SLinkContent> getContent()

      Returns:
        The content of the link

    - #### getTarget

          @Nonnull
          public String getTarget()

      Returns:
        The link target

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

    - #### listItemContentAccept

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

      Description copied from interface: `SListItemContent`
      Accept a list item content visitor.
      Specified by:
        `listItemContentAccept` in interface `SListItemContent`
      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`

    - #### paragraphContentAccept

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

      Description copied from interface: `SParagraphContent`
      Accept a paragraph content visitor.
      Specified by:
        `paragraphContentAccept` in interface `SParagraphContent`
      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`

    - #### tableCellContentAccept

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

      Description copied from interface: `STableCellContent`
      Accept a table cell content visitor.
      Specified by:
        `tableCellContentAccept` in interface `STableCellContent`
      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`

Copyright © 2014. All rights reserved.