AnimationIterationCount extends AbstractCssProperty<AnimationIterationCount> { public static boolean isValid(final String cssValue) { final String trimmedCssValue = TagStringUtil .toLowerCase(StringUtil.strip(cssValue)); if (StringUtil.containsSpace(trimmedCssValue)) { return false; } try { final int parsedValue = Integer.parseInt(trimmedCssValue); return !(parsedValue == 0 && (StringUtil.containsMinus(trimmedCssValue) || StringUtil.containsPlus(trimmedCssValue))); } catch (final NumberFormatException e) { } return PREDEFINED_CONSTANTS.contains(trimmedCssValue); } AnimationIterationCount();  AnimationIterationCount(final String cssValue);  AnimationIterationCount(
            final AnimationIterationCount animationIterationCount);  AnimationIterationCount(final int value); @Override String getCssName(); @Override String getCssValue(); @Override String toString(); Integer getValue(); void setValue(final int value); @Override AnimationIterationCount setCssValue(final String cssValue); void setAsInitial(); void setAsInherit(); void setAsInfinite(); static boolean isValid(final String cssValue); static final String INITIAL; static final String INHERIT; static final String INFINITE; }
@Test public void testIsValid() { assertTrue(AnimationIterationCount.isValid("1")); assertTrue(AnimationIterationCount.isValid("0")); assertTrue(AnimationIterationCount.isValid(AnimationIterationCount.INITIAL)); assertTrue(AnimationIterationCount.isValid(AnimationIterationCount.INHERIT)); assertTrue(AnimationIterationCount.isValid(AnimationIterationCount.INFINITE)); assertFalse(AnimationIterationCount.isValid(".5")); assertFalse(AnimationIterationCount.isValid("0.5")); assertFalse(AnimationIterationCount.isValid("0.1")); assertFalse(AnimationIterationCount.isValid("dfd")); assertFalse(AnimationIterationCount.isValid("1px")); assertFalse(AnimationIterationCount.isValid("")); assertFalse(AnimationIterationCount.isValid("1 1")); assertFalse(AnimationIterationCount.isValid("1.1")); assertFalse(AnimationIterationCount.isValid("-0.5")); assertFalse(AnimationIterationCount.isValid("-0")); assertFalse(AnimationIterationCount.isValid("-0.0")); assertFalse(AnimationIterationCount.isValid("+0.0")); }