BorderBottom extends AbstractCssProperty<BorderBottom> 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); BorderBottomWidth borderBottomWidth = null; BorderBottomStyle borderBottomStyle = null; BorderBottomColor borderBottomColor = null; for (final String eachPart : cssValueParts) { boolean invalid = true; if (borderBottomWidth == null && BorderBottomWidth.isValid(eachPart)) { borderBottomWidth = new BorderBottomWidth(eachPart); invalid = false; } else if (borderBottomStyle == null && BorderBottomStyle.isValid(eachPart)) { borderBottomStyle = BorderBottomStyle.getThis(eachPart); invalid = false; } else if (borderBottomColor == null && BorderBottomColor.isValid(eachPart)) { borderBottomColor = new BorderBottomColor(eachPart); invalid = false; } if (invalid) { return false; } } return borderBottomWidth != null || borderBottomStyle != null || borderBottomColor != null; } BorderBottom();  BorderBottom(final String cssValue);  BorderBottom(final BorderBottom borderBottom); @Override String getCssName(); @Override String getCssValue(); @Override String toString(); @Override BorderBottom setCssValue(final String cssValue); static boolean isValid(final String cssValue); void setAsInitial(); void setAsInherit(); BorderBottomColor getBorderBottomColor(); BorderBottomStyle getBorderBottomStyle(); BorderBottomWidth getBorderBottomWidth(); BorderBottom setBorderBottomWidth(
            final BorderBottomWidth borderBottomWidth); BorderBottom setBorderBottomStyle(
            final BorderBottomStyle borderBottomStyle); BorderBottom setBorderBottomColor(
            final BorderBottomColor borderBottomColor); @Override void stateChanged(final CssProperty stateChangedObject); static final String INITIAL; static final String INHERIT; }
@Test public void testIsValid() { assertTrue(BorderBottom.isValid("55px solid green")); assertTrue(BorderBottom.isValid("55px solid rgb(25, 255, 155)")); assertTrue(BorderBottom.isValid("55px")); assertTrue(BorderBottom.isValid("solid")); assertTrue(BorderBottom.isValid("green")); assertTrue(BorderBottom.isValid(BorderBottomWidth.MEDIUM + " " + BorderBottomStyle.DASHED.getCssValue() + " " + CssColorName.AZURE)); assertTrue(BorderBottom.isValid(BorderBottomWidth.THICK + " " + BorderBottomStyle.DOUBLE.getCssValue() + " " + CssColorName.AZURE)); assertFalse(BorderBottom.isValid("cir cle inside url(Test.png)")); assertFalse(BorderBottom.isValid("dmedium dfdf dfdfd")); assertFalse(BorderBottom.isValid("medium medium medium ")); assertFalse(BorderBottom.isValid("55 solid green")); assertFalse(BorderBottom.isValid("solid solid solid")); assertFalse(BorderBottom.isValid("55px solid green green")); }