Class SourceSet.ImageSource

java.lang.Object
com.adobe.epubcheck.util.SourceSet.ImageSource
Enclosing class:
SourceSet

public static final class SourceSet.ImageSource extends Object
Represent an image source. See https://html.spec.whatwg.org/#image-source
  • Field Details

    • url

      public final String url
    • width

      public final com.google.common.base.Optional<Integer> width
    • density

      public final com.google.common.base.Optional<Float> density
  • Constructor Details

    • ImageSource

      private ImageSource(String url, com.google.common.base.Optional<Integer> width, com.google.common.base.Optional<Float> density)
  • Method Details

    • create

      public static SourceSet.ImageSource create(String url, int width, float density)
      Returns a new image source.
      Parameters:
      url - the source URL, must not be null or empty.
      width - a width descriptor, will be absent if null or negative
      density - a density descriptor, will be absent if null or negative
      Returns:
      a new image source