com.io7m.jstructural.core

## Class SImage

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

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

      @Immutable
      public final class SImage
      extends Object
      implements SParagraphContent, SLinkContent, SListItemContent, SFootnoteContent, SFormalItemContent, STableCellContent

  An image.

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(Object obj)`
    `<A> A` | `footnoteContentAccept(SFootnoteContentVisitor<A> v)` Accept a footnote content visitor.
    `<A> A` | `formalItemContentAccept(SFormalItemContentVisitor<A> v)` Accept a formal item content visitor.
    `com.io7m.jaux.functional.Option<Integer>` | `getHeight()`
    `String` | `getText()`
    `com.io7m.jaux.functional.Option<String>` | `getType()`
    `URI` | `getURI()`
    `com.io7m.jaux.functional.Option<Integer>` | `getWidth()`
    `int` | `hashCode()`
    `static SImage` | `image(URI uri, String text)` Construct a image with the given URI.
    `static SImage` | `imageHeight(URI uri, int height, String text)` Construct a image with the given URI, type attribute, and height.
    `static SImage` | `imageTyped(URI uri, String type, String text)` Construct a image with the given URI, type attribute.
    `static SImage` | `imageTypedHeight(URI uri, String type, int height, String text)` Construct a image with the given URI, type attribute, and height.
    `static SImage` | `imageTypedWidth(URI uri, String type, int width, String text)` Construct a image with the given URI, type attribute, and width.
    `static SImage` | `imageTypedWidthHeight(URI uri, String type, int width, int height, String text)` Construct a image with the given URI, type attribute, and width/height.
    `static SImage` | `imageWidth(URI uri, int width, String text)` Construct a image with the given URI, type attribute, and width.
    `static SImage` | `imageWidthHeight(URI uri, int width, int height, String text)` Construct a image with the given URI, type attribute, and width/height.
    `<A> A` | `linkContentAccept(SLinkContentVisitor<A> v)` Accept a link content visitor.
    `<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

    - #### image

          @Nonnull
          public static SImage image(@Nonnull
                             URI uri,
                             @Nonnull
                             String text)
                              throws com.io7m.jaux.Constraints.ConstraintError

      Construct a image with the given URI.
      Parameters:
        `uri` - The URI
        `text` - The image text
      Returns:
        A new image
      Throws:
        `com.io7m.jaux.Constraints.ConstraintError` - If any parameter is `null`

    - #### imageHeight

          @Nonnull
          public static SImage imageHeight(@Nonnull
                                   URI uri,
                                   int height,
                                   @Nonnull
                                   String text)
                                    throws com.io7m.jaux.Constraints.ConstraintError

      Construct a image with the given URI, type attribute, and height.
      Parameters:
        `uri` - The URI
        `height` - The height
        `text` - The image text
      Returns:
        A new image
      Throws:
        `com.io7m.jaux.Constraints.ConstraintError` - If any parameter is `null`

    - #### imageTyped

          @Nonnull
          public static SImage imageTyped(@Nonnull
                                  URI uri,
                                  @Nonnull
                                  String type,
                                  @Nonnull
                                  String text)
                                   throws com.io7m.jaux.Constraints.ConstraintError

      Construct a image with the given URI, type attribute.
      Parameters:
        `uri` - The URI
        `type` - The type attribute
        `text` - The image text
      Returns:
        A new image
      Throws:
        `com.io7m.jaux.Constraints.ConstraintError` - If any parameter is `null`

    - #### imageTypedHeight

          @Nonnull
          public static SImage imageTypedHeight(@Nonnull
                                        URI uri,
                                        @Nonnull
                                        String type,
                                        int height,
                                        @Nonnull
                                        String text)
                                         throws com.io7m.jaux.Constraints.ConstraintError

      Construct a image with the given URI, type attribute, and height.
      Parameters:
        `uri` - The URI
        `type` - The type attribute
        `height` - The height
        `text` - The image text
      Returns:
        A new image
      Throws:
        `com.io7m.jaux.Constraints.ConstraintError` - If any parameter is `null`

    - #### imageTypedWidth

          @Nonnull
          public static SImage imageTypedWidth(@Nonnull
                                       URI uri,
                                       @Nonnull
                                       String type,
                                       int width,
                                       @Nonnull
                                       String text)
                                        throws com.io7m.jaux.Constraints.ConstraintError

      Construct a image with the given URI, type attribute, and width.
      Parameters:
        `uri` - The URI
        `type` - The type attribute
        `width` - The width
        `text` - The image text
      Returns:
        A new image
      Throws:
        `com.io7m.jaux.Constraints.ConstraintError` - If any parameter is `null`

    - #### imageTypedWidthHeight

          @Nonnull
          public static SImage imageTypedWidthHeight(@Nonnull
                                             URI uri,
                                             @Nonnull
                                             String type,
                                             int width,
                                             int height,
                                             @Nonnull
                                             String text)
                                              throws com.io7m.jaux.Constraints.ConstraintError

      Construct a image with the given URI, type attribute, and width/height.
      Parameters:
        `uri` - The URI
        `type` - The type attribute
        `width` - The width
        `height` - The height
        `text` - The image text
      Returns:
        A new image
      Throws:
        `com.io7m.jaux.Constraints.ConstraintError` - If any parameter is `null`

    - #### imageWidth

          @Nonnull
          public static SImage imageWidth(@Nonnull
                                  URI uri,
                                  int width,
                                  @Nonnull
                                  String text)
                                   throws com.io7m.jaux.Constraints.ConstraintError

      Construct a image with the given URI, type attribute, and width.
      Parameters:
        `uri` - The URI
        `width` - The width
        `text` - The image text
      Returns:
        A new image
      Throws:
        `com.io7m.jaux.Constraints.ConstraintError` - If any parameter is `null`

    - #### imageWidthHeight

          @Nonnull
          public static SImage imageWidthHeight(@Nonnull
                                        URI uri,
                                        int width,
                                        int height,
                                        @Nonnull
                                        String text)
                                         throws com.io7m.jaux.Constraints.ConstraintError

      Construct a image with the given URI, type attribute, and width/height.
      Parameters:
        `uri` - The URI
        `width` - The width
        `height` - The height
        `text` - The image text
      Returns:
        A new image
      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`

    - #### formalItemContentAccept

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

      Description copied from interface: `SFormalItemContent`
      Accept a formal item content visitor.
      Specified by:
        `formalItemContentAccept` in interface `SFormalItemContent`
      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`

    - #### getHeight

          @Nonnull
          public com.io7m.jaux.functional.Option<Integer> getHeight()

      Returns:
        The image height specified, if any

    - #### getText

          @Nonnull
          public String getText()

      Returns:
        The image text

    - #### getType

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

      Returns:
        The term's type attribute

    - #### getURI

          @Nonnull
          public URI getURI()

      Returns:
        The image URI

    - #### getWidth

          @Nonnull
          public com.io7m.jaux.functional.Option<Integer> getWidth()

      Returns:
        The image width specified, if any

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

    - #### linkContentAccept

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

      Description copied from interface: `SLinkContent`
      Accept a link content visitor.
      Specified by:
        `linkContentAccept` in interface `SLinkContent`
      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`

    - #### 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.