class WebkitFlex extends AbstractCssProperty<WebkitFlex> implements StateChangeInformer<CssProperty> {

    @Override
    public void stateChanged(final CssProperty stateChangedObject) {
        if (stateChangedObject instanceof WebkitFlexGrow) {

            final WebkitFlexGrow webkitFlexGrow = (WebkitFlexGrow) stateChangedObject;

            final String cssValue = webkitFlexGrow.getCssValue();

            if (WebkitFlexGrow.INITIAL.equals(cssValue)
                    || WebkitFlexGrow.INHERIT.equals(cssValue)) {
                throw new InvalidValueException(
                        "initial/inherit cannot be set as webkitFlexGrow cssValue");
            }
            this.cssValue = new StringBuilder(webkitFlexGrow.getCssValue())
                    .append(' ').append(webkitFlexShrink.getCssValue())
                    .append(' ').append(webkitFlexBasis.getCssValue())
                    .toString();
        } else if (stateChangedObject instanceof WebkitFlexShrink) {

            final WebkitFlexShrink webkitFlexShrink = (WebkitFlexShrink) stateChangedObject;

            final String cssValue = webkitFlexShrink.getCssValue();

            if (WebkitFlexShrink.INITIAL.equals(cssValue)
                    || WebkitFlexShrink.INHERIT.equals(cssValue)) {
                throw new InvalidValueException(
                        "initial/inherit cannot be set as webkitFlexShrink cssValue");
            }
            this.cssValue = new StringBuilder(webkitFlexGrow.getCssValue())
                    .append(' ').append(webkitFlexShrink.getCssValue())
                    .append(' ').append(webkitFlexBasis.getCssValue())
                    .toString();

        } else if (stateChangedObject instanceof WebkitFlexBasis) {

            final WebkitFlexBasis webkitFlexBasis = (WebkitFlexBasis) stateChangedObject;

            final String cssValue = webkitFlexBasis.getCssValue();

            if (WebkitFlexBasis.INITIAL.equals(cssValue)
                    || WebkitFlexBasis.INHERIT.equals(cssValue)) {
                throw new InvalidValueException(
                        "initial/inherit cannot be set as webkitFlexBasis cssValue");
            }

            this.cssValue = new StringBuilder(webkitFlexGrow.getCssValue())
                    .append(' ').append(webkitFlexShrink.getCssValue())
                    .append(' ').append(webkitFlexBasis.getCssValue())
                    .toString();
        }
    }

    public  WebkitFlex();
    public  WebkitFlex(final String cssValue);
    public  WebkitFlex(final WebkitFlex webkitFlex);

}