Class SourceSet

java.lang.Object
com.adobe.epubcheck.util.SourceSet

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

  • Constructor Details

  • Method Details

    • parse

      public static SourceSet parse(String srcset)
      Parses a `srcset` value and swallows the errors. See https://html.spec.whatwg.org/#parsing-a-srcset-attribute
    • parse

      public static SourceSet parse(String srcset, SourceSet.ErrorHandler errorHandler)
      Parses a `srcset` value and reports the errors to the given SourceSet.ErrorHandler.
    • getImageSources

      public List<SourceSet.ImageSource> getImageSources()
      Returns:
      the list of image sources in the source set.
    • getImageURLs

      public List<String> getImageURLs()
      Returns:
      the list of the URLs of the images sources in the source set.
    • getSourceSize

      public String getSourceSize()
      Returns:
      the number of sources in this source set.
    • isEmpty

      public boolean isEmpty()
      Returns:
      whether this source set is empty.