Style extends AbstractAttribute implements GlobalAttributable, StateChangeInformer<CssProperty> { public Collection<CssProperty> getCssProperties() { final long stamp = lock.readLock(); try { return Collections.unmodifiableSet(cssProperties); } finally { lock.unlockRead(stamp); } } Style();  Style(final String styles);  Style(final Map<String, String> styles);  Style(final CssProperty... cssProperties);  Style(final boolean important, final CssProperty... cssProperties); static void addSupportForNewCustomCssClass(final String cssName,
            final Class<?> cssClass); static void removeSupportOfCssClass(final Class<?> cssClass); static void removeSupportOfCssClasses(final Class<?>... cssClasses); void addCssProperties(final String cssProperties); boolean addCssProperties(final Map<String, String> cssProperties); boolean addCssProperty(final String cssName, final String cssValue); void addCssProperties(final boolean important,
            final CssProperty... cssProperties); List<CssProperty> addCssProperties(
            final CssProperty... cssProperties); @Deprecated List<CssProperty> addCssProperties(
            final Collection<? extends CssProperty> cssProperties); CssProperty addCssProperty(final CssProperty cssProperty); boolean removeCssProperty(final String cssName); boolean removeCssProperty(final String cssName,
            final String cssValue); boolean removeCssProperty(final CssProperty cssProperty); List<Boolean> removeCssProperties(
            final CssProperty... cssProperties); void removeAllCssProperties(); boolean contains(final CssProperty cssProperty); @Deprecated List<Boolean> removeCssProperties(
            final Collection<CssProperty> cssProperties); boolean markAsImportant(final String styleName); boolean markAsUnimportant(final String styleName); boolean isImportant(final CssProperty cssProperty); boolean isImportant(final String styleName); CssProperty getCssProperty(final String cssName); Collection<CssProperty> getCssProperties(); int getCssPropertiesSize(); boolean isCssPropertiesEmpty(); @Override void stateChanged(final CssProperty stateChangedObject); static Map<String, Class<?>> getSupportedCsspropertyClasses(); @Override String getAttributeValue();  }
@Test public void testGetCssProperties() throws Exception { final Style style = new Style(); WidthCss widthCss = new WidthCss(50F); style.addCssProperties(widthCss); Collection<CssProperty> cssProperties = style.getCssProperties(); assertEquals(widthCss, style.getCssProperty(CssNameConstants.WIDTH)); assertEquals(1, cssProperties.size()); HeightCss heightCss = new HeightCss(50F); style.addCssProperty(heightCss); assertEquals(heightCss, style.getCssProperty(CssNameConstants.HEIGHT)); HeightCss heightCss2 = new HeightCss(50F); { style.addCssProperty(heightCss2); assertEquals(2, style.getCssPropertiesSize()); assertTrue(heightCss2 == style.getCssProperty(CssNameConstants.HEIGHT)); assertEquals(heightCss2, style.getCssProperty(CssNameConstants.HEIGHT)); style.removeCssProperty(CssNameConstants.HEIGHT); assertFalse(cssProperties.contains(heightCss2)); } { style.addCssProperty(heightCss2); assertEquals(heightCss2, style.getCssProperty(CssNameConstants.HEIGHT)); style.removeCssProperty(heightCss2); assertNull(style.getCssProperty(CssNameConstants.HEIGHT)); } { style.addCssProperty(heightCss2); assertEquals(heightCss2, style.getCssProperty(CssNameConstants.HEIGHT)); style.removeCssProperty(heightCss2); assertNull(style.getCssProperty(CssNameConstants.HEIGHT)); style.removeCssProperty(heightCss2); style.removeCssProperty(heightCss2); assertNull(style.getCssProperty(CssNameConstants.HEIGHT)); assertFalse(cssProperties.contains(heightCss2)); } }