Class ValueList
java.lang.Object
io.sf.carte.doc.style.css.property.StyleValue
io.sf.carte.doc.style.css.property.ValueList
- All Implemented Interfaces:
CSSValue,CSSValueList<StyleValue>,Serializable,Cloneable,Iterable<StyleValue>
Implementation of ValueList.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.sf.carte.doc.style.css.CSSValue
CSSValue.CssType, CSSValue.Type -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionbooleanadd(StyleValue value) Adds a value to the end of this list.booleanAppends all of the elements in the given list to the end of this list.voidclear()Removes all the items from this list.abstract ValueListclone()Creates and returns a copy of this object.static ValueListstatic ValueListstatic ValueListbooleanintThe number of values in this list.inthashCode()booleanIs this a bracket list?abstract booleanbooleanisEmpty()Is this list empty ?booleanIs this a subproperty that has been set by a shorthand?item(int index) Retrieve aCSSValueby ordinal index.iterator()matches(CSSValueSyntax syntax) Verify if this value matches the given grammar.remove(int index) Removes the value at the specified index.set(int index, StyleValue value) Replaces the value at the specified index with the supplied value.voidsetCssText(String cssText) Attempts to change this value to match the supplied css text.voidsetSubproperty(boolean subp) abstract ValueListMethods inherited from class io.sf.carte.doc.style.css.property.StyleValue
getCssText, getMinifiedCssText, isPrimitiveValue, isSystemDefault, toStringMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface io.sf.carte.doc.style.css.CSSValue
getCssText, getMinifiedCssText, writeCssTextMethods inherited from interface io.sf.carte.doc.style.css.CSSValueList
getCssValueType, getPrimitiveTypeMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Field Details
-
valueList
-
-
Method Details
-
getLength
public int getLength()Description copied from interface:CSSValueListThe number of values in this list.- Specified by:
getLengthin interfaceCSSValueList<StyleValue>- Returns:
- the number of items in this list.
-
item
Description copied from interface:CSSValueListRetrieve aCSSValueby ordinal index.- Specified by:
itemin interfaceCSSValueList<StyleValue>- Parameters:
index- the index in this list.- Returns:
- the value at
index, ornullifindexis less than zero, or greater or equal to the list length.
-
iterator
- Specified by:
iteratorin interfaceIterable<StyleValue>
-
add
Adds a value to the end of this list.- Specified by:
addin interfaceCSSValueList<StyleValue>- Parameters:
value- the value to be added.- Returns:
- true
-
addAll
Appends all of the elements in the given list to the end of this list.The appended list must be of the same type as this list.
- Parameters:
list- the list to add.- Returns:
trueif this list changed as a result of the call.
-
remove
Removes the value at the specified index.- Specified by:
removein interfaceCSSValueList<StyleValue>- Parameters:
index- the index of the value to be removed.- Returns:
- the list item that was removed.
-
set
Replaces the value at the specified index with the supplied value.- Specified by:
setin interfaceCSSValueList<StyleValue>- Parameters:
index- the index of the value to be replaced.value- the value to replace the item atindex.- Returns:
- the item previously at the specified position.
- Throws:
IndexOutOfBoundsException- if the index is invalid.NullPointerException- if the value isnull.
-
isEmpty
public boolean isEmpty()Is this list empty ?- Specified by:
isEmptyin interfaceCSSValueList<StyleValue>- Returns:
trueif this list has no items,falseotherwise.
-
clear
public void clear()Removes all the items from this list.- Specified by:
clearin interfaceCSSValueList<StyleValue>
-
hashCode
public int hashCode()- Overrides:
hashCodein classStyleValue
-
equals
- Overrides:
equalsin classStyleValue
-
setSubproperty
public void setSubproperty(boolean subp) -
isSubproperty
public boolean isSubproperty()Description copied from class:StyleValueIs this a subproperty that has been set by a shorthand?- Overrides:
isSubpropertyin classStyleValue- Returns:
trueif this a subproperty that has been set by a shorthand,falseotherwise.
-
setCssText
Description copied from class:StyleValueAttempts to change this value to match the supplied css text.In css4j, it is not recommended to set property values using this method.
- Specified by:
setCssTextin interfaceCSSValue- Overrides:
setCssTextin classStyleValue- Parameters:
cssText- the text value.- Throws:
DOMException- SYNTAX_ERR: Raised if the specified CSS string value has a syntax error (according to the attached property) or is unparsable.
INVALID_MODIFICATION_ERR: Raised if the specified CSS string value represents a different type of values than the values allowed by the CSS property.
NO_MODIFICATION_ALLOWED_ERR: Raised if this value is read-only.
-
isCommaSeparated
public abstract boolean isCommaSeparated() -
isBracketList
public boolean isBracketList()Is this a bracket list?- Returns:
trueif this is a bracket list.
-
matches
Description copied from class:StyleValueVerify if this value matches the given grammar.- Specified by:
matchesin interfaceCSSValue- Overrides:
matchesin classStyleValue- Parameters:
syntax- the syntax.- Returns:
- the matching for the syntax.
-
clone
Creates and returns a copy of this object.The list is cloned, but its contents are not.
- Specified by:
clonein interfaceCSSValue- Specified by:
clonein interfaceCSSValueList<StyleValue>- Specified by:
clonein classStyleValue- Returns:
- a clone of this instance.
-
createCSValueList
-
createWSValueList
-
createBracketValueList
-
wrap
-