Package com.helger.css.property
Class CSSPropertyEnumOrNumbers
- java.lang.Object
-
- com.helger.css.property.AbstractCSSProperty
-
- com.helger.css.property.CSSPropertyEnum
-
- com.helger.css.property.CSSPropertyEnumOrNumbers
-
- All Implemented Interfaces:
ICSSVersionAware
,ICSSProperty
@NotThreadSafe public class CSSPropertyEnumOrNumbers extends CSSPropertyEnum
CSS property that is a list of either an enumeration or a numeric value (e.g. margin)- Author:
- Philip Helger
-
-
Constructor Summary
Constructors Constructor Description CSSPropertyEnumOrNumbers(ECSSProperty eProp, boolean bWithPercentage, int nMinNumbers, int nMaxNumbers, Iterable<String> aEnumValues)
CSSPropertyEnumOrNumbers(ECSSProperty eProp, boolean bWithPercentage, int nMinNumbers, int nMaxNumbers, String... aEnumValues)
CSSPropertyEnumOrNumbers(ECSSProperty eProp, ECSSVendorPrefix eVendorPrefix, ICSSPropertyCustomizer aCustomizer, boolean bWithPercentage, int nMinNumbers, int nMaxNumbers, Iterable<String> aEnumValues)
CSSPropertyEnumOrNumbers(ECSSProperty eProp, ECSSVendorPrefix eVendorPrefix, ICSSPropertyCustomizer aCustomizer, boolean bWithPercentage, int nMinNumbers, int nMaxNumbers, String... aEnumValues)
CSSPropertyEnumOrNumbers(ECSSProperty eProp, ICSSPropertyCustomizer aCustomizer, boolean bWithPercentage, int nMinNumbers, int nMaxNumbers, Iterable<String> aEnumValues)
CSSPropertyEnumOrNumbers(ECSSProperty eProp, ICSSPropertyCustomizer aCustomizer, boolean bWithPercentage, int nMinNumbers, int nMaxNumbers, String... aEnumValues)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
CSSPropertyEnumOrNumbers
getClone(ECSSVendorPrefix eVendorPrefix)
Get a clone of this property with the same base property but a different vendor prefix.CSSPropertyEnumOrNumbers
getClone(ECSSProperty eProp)
Get a clone of this property with another (or the same) base property.int
getMaximumArgumentCount()
int
getMinimumArgumentCount()
int
hashCode()
boolean
isValidValue(String sValue)
Check if the passed value is valid for this property according to the defined rule.String
toString()
-
Methods inherited from class com.helger.css.property.CSSPropertyEnum
directGetEnumValues
-
Methods inherited from class com.helger.css.property.AbstractCSSProperty
getCustomizer, 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
-
CSSPropertyEnumOrNumbers
public CSSPropertyEnumOrNumbers(@Nonnull ECSSProperty eProp, boolean bWithPercentage, @Nonnegative int nMinNumbers, @Nonnegative int nMaxNumbers, @Nonnull @Nonempty String... aEnumValues)
-
CSSPropertyEnumOrNumbers
public CSSPropertyEnumOrNumbers(@Nonnull ECSSProperty eProp, @Nullable ICSSPropertyCustomizer aCustomizer, boolean bWithPercentage, @Nonnegative int nMinNumbers, @Nonnegative int nMaxNumbers, @Nonnull @Nonempty String... aEnumValues)
-
CSSPropertyEnumOrNumbers
public CSSPropertyEnumOrNumbers(@Nonnull ECSSProperty eProp, @Nullable ECSSVendorPrefix eVendorPrefix, @Nullable ICSSPropertyCustomizer aCustomizer, boolean bWithPercentage, @Nonnegative int nMinNumbers, @Nonnegative int nMaxNumbers, @Nonnull @Nonempty String... aEnumValues)
-
CSSPropertyEnumOrNumbers
public CSSPropertyEnumOrNumbers(@Nonnull ECSSProperty eProp, boolean bWithPercentage, @Nonnegative int nMinNumbers, @Nonnegative int nMaxNumbers, @Nonnull @Nonempty Iterable<String> aEnumValues)
-
CSSPropertyEnumOrNumbers
public CSSPropertyEnumOrNumbers(@Nonnull ECSSProperty eProp, @Nullable ICSSPropertyCustomizer aCustomizer, boolean bWithPercentage, @Nonnegative int nMinNumbers, @Nonnegative int nMaxNumbers, @Nonnull @Nonempty Iterable<String> aEnumValues)
-
CSSPropertyEnumOrNumbers
public CSSPropertyEnumOrNumbers(@Nonnull ECSSProperty eProp, @Nullable ECSSVendorPrefix eVendorPrefix, @Nullable ICSSPropertyCustomizer aCustomizer, boolean bWithPercentage, @Nonnegative int nMinNumbers, @Nonnegative int nMaxNumbers, @Nonnull @Nonempty Iterable<String> aEnumValues)
-
-
Method Detail
-
getMinimumArgumentCount
public int getMinimumArgumentCount()
- Specified by:
getMinimumArgumentCount
in interfaceICSSProperty
- Overrides:
getMinimumArgumentCount
in classAbstractCSSProperty
- Returns:
- The minimum number of arguments for this property.
-
getMaximumArgumentCount
public int getMaximumArgumentCount()
- Specified by:
getMaximumArgumentCount
in interfaceICSSProperty
- Overrides:
getMaximumArgumentCount
in classAbstractCSSProperty
- Returns:
- The maximum number of arguments for this property.
-
isValidValue
@OverridingMethodsMustInvokeSuper public boolean isValidValue(@Nullable String sValue)
Description copied from interface:ICSSProperty
Check if the passed value is valid for this property according to the defined rule.- Specified by:
isValidValue
in interfaceICSSProperty
- Overrides:
isValidValue
in classCSSPropertyEnum
- Parameters:
sValue
- The value to check. May benull
.- Returns:
true
if the value is valid,false
otherwise
-
getClone
@Nonnull public CSSPropertyEnumOrNumbers getClone(@Nonnull ECSSProperty eProp)
Description copied from interface:ICSSProperty
Get a clone of this property with another (or the same) base property.- Specified by:
getClone
in interfaceICSSProperty
- Overrides:
getClone
in classCSSPropertyEnum
- Parameters:
eProp
- The base property to use. May not benull
.- Returns:
- Never
null
-
getClone
@Nonnull public CSSPropertyEnumOrNumbers getClone(@Nullable ECSSVendorPrefix eVendorPrefix)
Description copied from interface:ICSSProperty
Get a clone of this property with the same base property but a different vendor prefix.- Specified by:
getClone
in interfaceICSSProperty
- Overrides:
getClone
in classCSSPropertyEnum
- Parameters:
eVendorPrefix
- The new vendor prefix to use. May benull
.- Returns:
- Never
null
-
equals
public boolean equals(Object o)
- Overrides:
equals
in classCSSPropertyEnum
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classCSSPropertyEnum
-
toString
public String toString()
- Overrides:
toString
in classCSSPropertyEnum
-
-