Package io.sf.carte.doc.style.css
Interface CSSValueList<E extends CSSValue>
- Type Parameters:
E- the value type.
- All Known Implementing Classes:
LinkedCSSValueList,ValueList
Based on W3C's
CSSValueList interface.-
Nested Class Summary
Nested classes/interfaces inherited from interface io.sf.carte.doc.style.css.CSSValue
CSSValue.CssType, CSSValue.Type -
Method Summary
Modifier and TypeMethodDescriptionbooleanAdds a value to the end of this list.voidclear()Removes all the items from this list.clone()Creates and returns a copy of this object.default CSSValue.CssTypeGet the general category to which this value belongs.intThe number of values in this list.default CSSValue.TypeGet the primitive type.booleanisEmpty()Is this list empty ?item(int index) Retrieve aCSSValueby ordinal index.remove(int index) Removes the value at the specified index.Replaces the value at the specified index with the supplied value.Methods inherited from interface io.sf.carte.doc.style.css.CSSValue
getCssText, getMinifiedCssText, matches, setCssText, writeCssTextMethods inherited from interface java.lang.Iterable
forEach, iterator, spliterator
-
Method Details
-
getLength
int getLength()The number of values in this list.- Returns:
- the number of items in this list.
-
add
Adds a value to the end of this list.- Parameters:
value- the value to be added.- Returns:
true(for consistency with Java collections).
-
clear
void clear()Removes all the items from this list. -
isEmpty
boolean isEmpty()Is this list empty ?- Returns:
trueif this list has no items,falseotherwise.
-
item
Retrieve aCSSValueby ordinal index.- Parameters:
index- the index in this list.- Returns:
- the value at
index, ornullifindexis less than zero, or greater or equal to the list length.
-
remove
Removes the value at the specified index.- Parameters:
index- the index of the value to be removed.- Returns:
- the list item that was removed.
- Throws:
IndexOutOfBoundsException- if the index is invalid.
-
set
Replaces the value at the specified index with the supplied value.- 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.
-
clone
CSSValueList<E> clone()Creates and returns a copy of this object.The list is cloned, but its contents are not.
-
getCssValueType
Description copied from interface:CSSValueGet the general category to which this value belongs.- Specified by:
getCssValueTypein interfaceCSSValue- Returns:
- the general value type.
-
getPrimitiveType
Description copied from interface:CSSValueGet the primitive type.- Specified by:
getPrimitiveTypein interfaceCSSValue- Returns:
- the primitive type.
-