Package com.helger.css.property
Class CSSPropertyEnumOrNumber
- java.lang.Object
-
- com.helger.css.property.AbstractCSSProperty
-
- com.helger.css.property.CSSPropertyEnum
-
- com.helger.css.property.CSSPropertyEnumOrNumber
-
- All Implemented Interfaces:
ICSSVersionAware,ICSSProperty
@NotThreadSafe public class CSSPropertyEnumOrNumber extends CSSPropertyEnum
CSS property that is either an enumeration or a numeric value (e.g. font-size)- Author:
- Philip Helger
-
-
Constructor Summary
Constructors Constructor Description CSSPropertyEnumOrNumber(ECSSProperty eProp, boolean bWithPercentage, Iterable<String> aEnumValues)CSSPropertyEnumOrNumber(ECSSProperty eProp, boolean bWithPercentage, String... aEnumValues)CSSPropertyEnumOrNumber(ECSSProperty eProp, ECSSVendorPrefix eVendorPrefix, ICSSPropertyCustomizer aCustomizer, boolean bWithPercentage, Iterable<String> aEnumValues)CSSPropertyEnumOrNumber(ECSSProperty eProp, ECSSVendorPrefix eVendorPrefix, ICSSPropertyCustomizer aCustomizer, boolean bWithPercentage, String... aEnumValues)CSSPropertyEnumOrNumber(ECSSProperty eProp, ICSSPropertyCustomizer aCustomizer, boolean bWithPercentage, Iterable<String> aEnumValues)CSSPropertyEnumOrNumber(ECSSProperty eProp, ICSSPropertyCustomizer aCustomizer, boolean bWithPercentage, String... aEnumValues)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)CSSPropertyEnumOrNumbergetClone(ECSSVendorPrefix eVendorPrefix)Get a clone of this property with the same base property but a different vendor prefix.CSSPropertyEnumOrNumbergetClone(ECSSProperty eProp)Get a clone of this property with another (or the same) base property.inthashCode()booleanisValidValue(String sValue)Check if the passed value is valid for this property according to the defined rule.StringtoString()-
Methods inherited from class com.helger.css.property.CSSPropertyEnum
directGetEnumValues
-
Methods inherited from class com.helger.css.property.AbstractCSSProperty
getCustomizer, getMaximumArgumentCount, getMinimumArgumentCount, getMinimumCSSVersion, getProp, getPropertyName, getVendorPrefix, isValidPropertyValue, newValue
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.helger.css.property.ICSSProperty
newImportantValue, newImportantValue, newValue, newValue, newValue
-
-
-
-
Constructor Detail
-
CSSPropertyEnumOrNumber
public CSSPropertyEnumOrNumber(@Nonnull ECSSProperty eProp, boolean bWithPercentage, @Nonnull @Nonempty String... aEnumValues)
-
CSSPropertyEnumOrNumber
public CSSPropertyEnumOrNumber(@Nonnull ECSSProperty eProp, @Nullable ICSSPropertyCustomizer aCustomizer, boolean bWithPercentage, @Nonnull @Nonempty String... aEnumValues)
-
CSSPropertyEnumOrNumber
public CSSPropertyEnumOrNumber(@Nonnull ECSSProperty eProp, @Nullable ECSSVendorPrefix eVendorPrefix, @Nullable ICSSPropertyCustomizer aCustomizer, boolean bWithPercentage, @Nonnull @Nonempty String... aEnumValues)
-
CSSPropertyEnumOrNumber
public CSSPropertyEnumOrNumber(@Nonnull ECSSProperty eProp, boolean bWithPercentage, @Nonnull @Nonempty Iterable<String> aEnumValues)
-
CSSPropertyEnumOrNumber
public CSSPropertyEnumOrNumber(@Nonnull ECSSProperty eProp, @Nullable ICSSPropertyCustomizer aCustomizer, boolean bWithPercentage, @Nonnull @Nonempty Iterable<String> aEnumValues)
-
CSSPropertyEnumOrNumber
public CSSPropertyEnumOrNumber(@Nonnull ECSSProperty eProp, @Nullable ECSSVendorPrefix eVendorPrefix, @Nullable ICSSPropertyCustomizer aCustomizer, boolean bWithPercentage, @Nonnull @Nonempty Iterable<String> aEnumValues)
-
-
Method Detail
-
isValidValue
@OverridingMethodsMustInvokeSuper public boolean isValidValue(@Nullable String sValue)
Description copied from interface:ICSSPropertyCheck if the passed value is valid for this property according to the defined rule.- Specified by:
isValidValuein interfaceICSSProperty- Overrides:
isValidValuein classCSSPropertyEnum- Parameters:
sValue- The value to check. May benull.- Returns:
trueif the value is valid,falseotherwise
-
getClone
@Nonnull public CSSPropertyEnumOrNumber getClone(@Nonnull ECSSProperty eProp)
Description copied from interface:ICSSPropertyGet a clone of this property with another (or the same) base property.- Specified by:
getClonein interfaceICSSProperty- Overrides:
getClonein classCSSPropertyEnum- Parameters:
eProp- The base property to use. May not benull.- Returns:
- Never
null
-
getClone
@Nonnull public CSSPropertyEnumOrNumber getClone(@Nullable ECSSVendorPrefix eVendorPrefix)
Description copied from interface:ICSSPropertyGet a clone of this property with the same base property but a different vendor prefix.- Specified by:
getClonein interfaceICSSProperty- Overrides:
getClonein classCSSPropertyEnum- Parameters:
eVendorPrefix- The new vendor prefix to use. May benull.- Returns:
- Never
null
-
equals
public boolean equals(Object o)
- Overrides:
equalsin classCSSPropertyEnum
-
hashCode
public int hashCode()
- Overrides:
hashCodein classCSSPropertyEnum
-
toString
public String toString()
- Overrides:
toStringin classCSSPropertyEnum
-
-