java.lang.Object
com.kohlschutter.boilerpipe.document.Image
All Implemented Interfaces:
Comparable<Image>

public class Image extends Object implements Comparable<Image>
Represents an Image resource that is contained in the document. Any of the attributes may be null, except for "src".
  • Field Details

    • src

      private final String src
    • width

      private final String width
    • height

      private final String height
    • alt

      private final String alt
    • area

      private final int area
  • Constructor Details

  • Method Details

    • getSrc

      public String getSrc()
    • getWidth

      public String getWidth()
    • getHeight

      public String getHeight()
    • getAlt

      public String getAlt()
    • nullTrim

      private static String nullTrim(String s)
    • getArea

      public int getArea()
      Returns the image's area (specified by width * height), or -1 if width/height weren't both specified or could not be parsed.
      Returns:
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • compareTo

      public int compareTo(Image o)
      Specified by:
      compareTo in interface Comparable<Image>