Class ThumbnailArg


  • public class ThumbnailArg
    extends java.lang.Object
    • Constructor Detail

      • ThumbnailArg

        public ThumbnailArg​(@Nonnull
                            java.lang.String path,
                            @Nonnull
                            ThumbnailFormat format,
                            @Nonnull
                            ThumbnailSize size,
                            @Nonnull
                            ThumbnailMode mode)
        Use newBuilder(java.lang.String) to create instances of this class without specifying values for all optional fields.
        Parameters:
        path - The path to the image file you want to thumbnail. Must match pattern " (/(.|[\\r\\n])*|id:.*)|(rev:[0-9a-f]{9,})|(ns:[0-9]+(/.*)?)" and not be null.
        format - The format for the thumbnail image, jpeg (default) or png. For images that are photos, jpeg should be preferred, while png is better for screenshots and digital arts. Must not be null.
        size - The size for the thumbnail image. Must not be null.
        mode - How to resize and crop the image to achieve the desired size. Must not be null.
        Throws:
        java.lang.IllegalArgumentException - If any argument does not meet its preconditions.
      • ThumbnailArg

        public ThumbnailArg​(@Nonnull
                            java.lang.String path)
        None

        The default values for unset fields will be used.

        Parameters:
        path - The path to the image file you want to thumbnail. Must match pattern " (/(.|[\\r\\n])*|id:.*)|(rev:[0-9a-f]{9,})|(ns:[0-9]+(/.*)?)" and not be null.
        Throws:
        java.lang.IllegalArgumentException - If any argument does not meet its preconditions.
    • Method Detail

      • getPath

        @Nonnull
        public java.lang.String getPath()
        The path to the image file you want to thumbnail.
        Returns:
        value for this field, never null.
      • getFormat

        @Nonnull
        public ThumbnailFormat getFormat()
        The format for the thumbnail image, jpeg (default) or png. For images that are photos, jpeg should be preferred, while png is better for screenshots and digital arts.
        Returns:
        value for this field, or null if not present. Defaults to ThumbnailFormat.JPEG.
      • getSize

        @Nonnull
        public ThumbnailSize getSize()
        The size for the thumbnail image.
        Returns:
        value for this field, or null if not present. Defaults to ThumbnailSize.W64H64.
      • getMode

        @Nonnull
        public ThumbnailMode getMode()
        How to resize and crop the image to achieve the desired size.
        Returns:
        value for this field, or null if not present. Defaults to ThumbnailMode.STRICT.
      • newBuilder

        public static ThumbnailArg.Builder newBuilder​(java.lang.String path)
        Returns a new builder for creating an instance of this class.
        Parameters:
        path - The path to the image file you want to thumbnail. Must match pattern " (/(.|[\\r\\n])*|id:.*)|(rev:[0-9a-f]{9,})|(ns:[0-9]+(/.*)?)" and not be null.
        Returns:
        builder for this class.
        Throws:
        java.lang.IllegalArgumentException - If any argument does not meet its preconditions.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • toStringMultiline

        public java.lang.String toStringMultiline()
        Returns a String representation of this object formatted for easier readability.

        The returned String may contain newlines.

        Returns:
        Formatted, multiline String representation of this object