BorderLeft extends AbstractCssProperty<BorderLeft> 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); BorderLeftWidth borderLeftWidth = null; BorderLeftStyle borderLeftStyle = null; BorderLeftColor borderLeftColor = null; for (final String eachPart : cssValueParts) { boolean invalid = true; if (borderLeftWidth == null && BorderLeftWidth.isValid(eachPart)) { borderLeftWidth = new BorderLeftWidth(eachPart); invalid = false; } else if (borderLeftStyle == null && BorderLeftStyle.isValid(eachPart)) { borderLeftStyle = BorderLeftStyle.getThis(eachPart); invalid = false; } else if (borderLeftColor == null && BorderLeftColor.isValid(eachPart)) { borderLeftColor = new BorderLeftColor(eachPart); invalid = false; } if (invalid) { return false; } } return borderLeftWidth != null || borderLeftStyle != null || borderLeftColor != null; } BorderLeft();  BorderLeft(final String cssValue);  BorderLeft(final BorderLeft borderLeft); @Override String getCssName(); @Override String getCssValue(); @Override String toString(); @Override BorderLeft setCssValue(final String cssValue); static boolean isValid(final String cssValue); void setAsInitial(); void setAsInherit(); BorderLeftColor getBorderLeftColor(); BorderLeftStyle getBorderLeftStyle(); BorderLeftWidth getBorderLeftWidth(); BorderLeft setBorderLeftWidth(
            final BorderLeftWidth borderLeftWidth); BorderLeft setBorderLeftStyle(
            final BorderLeftStyle borderLeftStyle); BorderLeft setBorderLeftColor(
            final BorderLeftColor borderLeftColor); @Override void stateChanged(final CssProperty stateChangedObject); static final String INITIAL; static final String INHERIT; }
@Test public void testIsValid() { assertTrue(BorderLeft.isValid("55px solid green")); assertTrue(BorderLeft.isValid("55px solid rgb(25, 255, 155)")); assertTrue(BorderLeft.isValid("55px")); assertTrue(BorderLeft.isValid("solid")); assertTrue(BorderLeft.isValid("green")); assertTrue(BorderLeft.isValid(BorderLeftWidth.MEDIUM + " " + BorderLeftStyle.DASHED.getCssValue() + " " + CssColorName.AZURE)); assertTrue(BorderLeft.isValid(BorderLeftWidth.THICK + " " + BorderLeftStyle.DOUBLE.getCssValue() + " " + CssColorName.AZURE)); assertFalse(BorderLeft.isValid("cir cle inside url(Test.png)")); assertFalse(BorderLeft.isValid("dmedium dfdf dfdfd")); assertFalse(BorderLeft.isValid("medium medium medium ")); assertFalse(BorderLeft.isValid("55 solid green")); assertFalse(BorderLeft.isValid("solid solid solid")); assertFalse(BorderLeft.isValid("55px solid green green")); }