BorderRight extends AbstractCssProperty<BorderRight> implements StateChangeInformer<CssProperty> { public static boolean isValid(final String cssValue) { if (cssValue == null || StringUtil.isBlank(cssValue)) { return false; } final List<String> cssValueParts = CssValueUtil.split(cssValue); BorderRightWidth borderRightWidth = null; BorderRightStyle borderRightStyle = null; BorderRightColor borderRightColor = null; for (final String eachPart : cssValueParts) { boolean invalid = true; if (borderRightWidth == null && BorderRightWidth.isValid(eachPart)) { borderRightWidth = new BorderRightWidth(eachPart); invalid = false; } else if (borderRightStyle == null && BorderRightStyle.isValid(eachPart)) { borderRightStyle = BorderRightStyle.getThis(eachPart); invalid = false; } else if (borderRightColor == null && BorderRightColor.isValid(eachPart)) { borderRightColor = new BorderRightColor(eachPart); invalid = false; } if (invalid) { return false; } } return borderRightWidth != null || borderRightStyle != null || borderRightColor != null; } BorderRight();  BorderRight(final String cssValue);  BorderRight(final BorderRight borderRight); @Override String getCssName(); @Override String getCssValue(); @Override String toString(); @Override BorderRight setCssValue(final String cssValue); static boolean isValid(final String cssValue); void setAsInitial(); void setAsInherit(); BorderRightColor getBorderRightColor(); BorderRightStyle getBorderRightStyle(); BorderRightWidth getBorderRightWidth(); BorderRight setBorderRightWidth(
            final BorderRightWidth borderRightWidth); BorderRight setBorderRightStyle(
            final BorderRightStyle borderRightStyle); BorderRight setBorderRightColor(
            final BorderRightColor borderRightColor); @Override void stateChanged(final CssProperty stateChangedObject); static final String INITIAL; static final String INHERIT; }
@Test public void testIsValid() { assertTrue(BorderRight.isValid("55px solid green")); assertTrue(BorderRight.isValid("55px solid rgb(25, 255, 155)")); assertTrue(BorderRight.isValid("55px")); assertTrue(BorderRight.isValid("solid")); assertTrue(BorderRight.isValid("green")); assertTrue(BorderRight.isValid(BorderRightWidth.MEDIUM + " " + BorderRightStyle.DASHED.getCssValue() + " " + CssColorName.AZURE)); assertTrue(BorderRight.isValid(BorderRightWidth.THICK + " " + BorderRightStyle.DOUBLE.getCssValue() + " " + CssColorName.AZURE)); assertFalse(BorderRight.isValid("cir cle inside url(Test.png)")); assertFalse(BorderRight.isValid("dmedium dfdf dfdfd")); assertFalse(BorderRight.isValid("medium medium medium ")); assertFalse(BorderRight.isValid("55 solid green")); assertFalse(BorderRight.isValid("solid solid solid")); assertFalse(BorderRight.isValid("55px solid green green")); }