Class RgbCssValue

    • Constructor Detail

      • RgbCssValue

        public RgbCssValue​()
      • RgbCssValue

        public RgbCssValue​(java.lang.String rgbCssValue)
        Parameters:
        rgbCssValue - eg:- rgb(15, 55, 155)
      • RgbCssValue

        public RgbCssValue​(RgbCssValue rgbCssValue)
      • RgbCssValue

        public RgbCssValue​(int r,
                           int g,
                           int b)
        Parameters:
        r - red value. accepts values only from 0 to 255.
        g - green value. accepts values only from 0 to 255.
        b - blue value. accepts values only from 0 to 255.
    • Method Detail

      • setRgb

        public void setRgb​(java.lang.String rgb)
        Parameters:
        rgb - eg:- rgb(15, 55, 155)
        Since:
        1.0.0
      • getR

        public int getR​()
      • setR

        public void setR​(int r)
      • getG

        public int getG​()
      • setG

        public void setG​(int g)
      • getB

        public int getB​()
      • setB

        public void setB​(int b)
      • toString

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

        public java.lang.String getValue​()
        Returns:
        the print format of these values as a css value.
        Since:
        1.0.0
      • isValid

        public static boolean isValid​(java.lang.String rgbString)
        Parameters:
        rgbString - eg:- rgb(25, 155, 55)
        Returns:
        true if valid and false for invalid.
        Since:
        1.0.0