Package com.helger.css.property
Class AbstractCSSProperty
java.lang.Object
com.helger.css.property.AbstractCSSProperty
- All Implemented Interfaces:
ICSSVersionAware,ICSSProperty
- Direct Known Subclasses:
CSSPropertyColor,CSSPropertyColors,CSSPropertyDouble,CSSPropertyEnum,CSSPropertyFree,CSSPropertyLong,CSSPropertyNumber,CSSPropertyNumbers,CSSPropertyURL
Abstract base class for implementing
ICSSProperty- Author:
- Philip Helger
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractCSSProperty(ECSSProperty eProp, ECSSVendorPrefix eVendorPrefix, ICSSPropertyCustomizer aCustomizer) Constructor -
Method Summary
Modifier and TypeMethodDescriptionbooleanfinal ICSSPropertyCustomizerintintfinal ECSSVersionfinal ECSSPropertygetProp()final Stringfinal ECSSVendorPrefixinthashCode()static booleanisValidPropertyValue(String sValue) booleanisValidValue(String sValue) Check if the passed value is valid for this property according to the defined rule.Create a new CSS value with this property and the specified value.toString()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.helger.css.property.ICSSProperty
getClone, getClone, newImportantValue, newImportantValue, newValue, newValue, newValue
-
Constructor Details
-
AbstractCSSProperty
protected AbstractCSSProperty(@Nonnull ECSSProperty eProp, @Nullable ECSSVendorPrefix eVendorPrefix, @Nullable ICSSPropertyCustomizer aCustomizer) Constructor- Parameters:
eProp- The base property to use. May not benull.eVendorPrefix- The vendor prefix to be used. May benull.aCustomizer- The customizer to be used. May benull.
-
-
Method Details
-
getMinimumCSSVersion
- Specified by:
getMinimumCSSVersionin interfaceICSSVersionAware- Returns:
- The minimum CSS version that is required to read or write this
artifact. May not be
null.
-
getProp
- Specified by:
getPropin interfaceICSSProperty- Returns:
- The underlying base property. Never
null.
-
getVendorPrefix
- Specified by:
getVendorPrefixin interfaceICSSProperty- Returns:
- The vendor prefix to be used. May be
null.
-
getPropertyName
- Specified by:
getPropertyNamein interfaceICSSProperty- Returns:
- The property name including an eventually contained vendor prefix.
Neither
nullnor empty.
-
getCustomizer
- Specified by:
getCustomizerin interfaceICSSProperty- Returns:
- The CSS customizer assigned to this property. May be
null.
-
getMinimumArgumentCount
- Specified by:
getMinimumArgumentCountin interfaceICSSProperty- Returns:
- The minimum number of arguments for this property.
-
getMaximumArgumentCount
- Specified by:
getMaximumArgumentCountin interfaceICSSProperty- Returns:
- The maximum number of arguments for this property.
-
isValidPropertyValue
-
isValidValue
Description copied from interface:ICSSPropertyCheck if the passed value is valid for this property according to the defined rule.- Specified by:
isValidValuein interfaceICSSProperty- Parameters:
sValue- The value to check. May benull.- Returns:
trueif the value is valid,falseotherwise
-
newValue
Description copied from interface:ICSSPropertyCreate a new CSS value with this property and the specified value.- Specified by:
newValuein interfaceICSSProperty- Parameters:
sValue- The CSS String value. May neither benullnor empty.bIsImportant-trueif it is an important value,falseif not- Returns:
- Never
null.
-
equals
-
hashCode
public int hashCode() -
toString
-