Enum Image.ResolutionLevel

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<Image.ResolutionLevel>
    Enclosing class:
    Image

    public static enum Image.ResolutionLevel
    extends java.lang.Enum<Image.ResolutionLevel>
    The estimated resolution level of an Image.

    Some services don't return the size of their images, but we may know for a specific image type that a service returns, according to real data, an approximation of the resolution level.

    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      HIGH
      The high resolution level.
      LOW
      The low resolution level.
      MEDIUM
      The medium resolution level.
      UNKNOWN
      The unknown resolution level.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static Image.ResolutionLevel fromHeight​(int heightPx)
      Get a Image.ResolutionLevel based from the given height.
      static Image.ResolutionLevel valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static Image.ResolutionLevel[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Enum Constant Detail

      • HIGH

        public static final Image.ResolutionLevel HIGH
        The high resolution level.

        This level applies to images with a height greater than or equal to 720px.

      • MEDIUM

        public static final Image.ResolutionLevel MEDIUM
        The medium resolution level.

        This level applies to images with a height between 175px inclusive and 720px exclusive.

      • LOW

        public static final Image.ResolutionLevel LOW
        The low resolution level.

        This level applies to images with a height between 1px inclusive and 175px exclusive.

      • UNKNOWN

        public static final Image.ResolutionLevel UNKNOWN
        The unknown resolution level.

        This value is returned when the extractor doesn't know what resolution level an image could have, for example if the extractor loops in an array of images with different resolution levels without knowing the height.

    • Method Detail

      • values

        public static Image.ResolutionLevel[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (Image.ResolutionLevel c : Image.ResolutionLevel.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static Image.ResolutionLevel valueOf​(java.lang.String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null