Class DimensionUtil


  • public final class DimensionUtil
    extends Object
    Utility methods for Dimensions.
    • Method Detail

      • min

        public static Dimension min​(Dimension... pDimensions)
        Accepts an array of Dimensions and returns a new Dimension whose width and height are the smallest of each width/height in argument dimensions.
        Parameters:
        pDimensions - Dimension to be constrained.
        Returns:
        Dimension whose width and height are the minimum of all argument dimensions.
      • max

        public static Dimension max​(Dimension... pDimensions)
        Accepts an array of Dimensions and returns a new Dimension whose width and height are the largest of each width/height in argument dimensions.
        Parameters:
        pDimensions - Dimension to be constrained.
        Returns:
        Dimension whose width and height are the minimum of all argument dimensions.