TContentType - type of the properties of this style.public abstract class CssStyle<TContentType extends CssContentTypeBase> extends Object
| Modifier and Type | Field and Description |
|---|---|
protected Map<String,TContentType> |
properties
Contains all the properties provided by this style.
|
| Constructor and Description |
|---|
CssStyle()
Creates a new instance.
|
CssStyle(String name)
Creates a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
<TContentTypeOther extends TContentType> |
combineWithStyle(CssStyle<TContentTypeOther> style)
|
protected abstract TContentType |
createContentType(String name)
Creates at new
CssContentTypeBase based on the given name. |
boolean |
equals(Object obj)
Determines if the given object areEqualOrNull the provided object.
|
TContentType |
getCssContentType(String name)
Returns the
CssContentTypeBase in the given map of properties using the provided key or null if no such content type exist. |
<TContent extends TContentType> |
getCssContentType(String name,
Class<TContent> clazz)
Returns the
CssContentTypeBase in the properties as the desired type using the provided key or null if no such content type exist. |
String |
getName() |
Map<String,TContentType> |
getProperties()
Returns the
properties as an unmodifiable list. |
boolean |
hasCssContentType(String name)
Determines if the given property in contain in he style.
|
int |
hashCode()
Gets the HashCode this object, which is based on the
name. |
void |
parseCssText(String cssText)
Consumes the given css text and set the style. the css text must follow the default rules of a css style.
|
protected final Map<String,TContentType extends CssContentTypeBase> properties
public CssStyle()
public CssStyle(String name)
name - the name to of this style.public final Map<String,TContentType> getProperties()
properties as an unmodifiable list.properties as an unmodifiable list.protected abstract TContentType createContentType(String name)
CssContentTypeBase based on the given name.name - name of the propertyCssContentTypeBase.public final TContentType getCssContentType(String name)
CssContentTypeBase in the given map of properties using the provided key or null if no such content type exist.name - name of the propertyCssContentTypeBase in the given map or null.public final boolean hasCssContentType(String name)
name - name of the property to look for.public final <TContent extends TContentType> TContent getCssContentType(String name, Class<TContent> clazz)
CssContentTypeBase in the properties as the desired type using the provided key or null if no such content type exist.TContent - type of the content desired.name - name of the propertyclazz - class of the type of the property used for casting.CssContentTypeBase or null.public final <TContentTypeOther extends TContentType> void combineWithStyle(CssStyle<TContentTypeOther> style)
CssStyle with the given CssStyle, new properties not present in this style will be added.TContentTypeOther - the type of the CssStyle this style will be combined withstyle - the CssStyle which is be used, must not be null.IllegalArgumentException - if the given CssStyle is null.public final void parseCssText(String cssText) throws DOMException
cssText - the text that is to be consumed, must not be null or empty.DOMExceptionpublic int hashCode()
name.Copyright © 2016 Saxonia Systems AG. All rights reserved.