com.groupdocs.parser.data

Class Size



  • public class Size
    extends Object
    Represents a size.
    • Constructor Detail

      • Size

        public Size(double width,
                    double height)
        Initializes a new instance of the Size class.
        Parameters:
        width - The width in pixels.
        height - The height in pixels.
    • Method Detail

      • getWidth

        public double getWidth()
        Gets the width.
        Returns:
        A double value that represents the width in pixels.
      • getHeight

        public double getHeight()
        Gets the height.
        Returns:
        A double value that represents the height in pixels.
      • isEmpty

        public boolean isEmpty()
        Gets a value that indicates whether the size is empty.
        Returns:
        true if the width and height are zero; otherwise, false.
      • parse

        public static Size parse(String s)
        Converts the string representation of a size to its class equivalent. A return value indicates whether the conversion is succeeded or failed.
        Parameters:
        s - A string containing a size to convert.
        Returns:
        The instance of Size class that is equivalent to the value specified in s parameter.
        Throws:
        IllegalArgumentException - s does not represent a size in a valid format.