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 TypeMethodDescriptionboolean
Adds a value to the end of this list.void
clear()
Removes all the items from this list.clone()
Creates and returns a copy of this object.default CSSValue.CssType
Get the general category to which this value belongs.int
The number of values in this list.default CSSValue.Type
Get the primitive type.boolean
isEmpty()
Is this list empty ?item
(int index) Retrieve aCSSValue
by 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, writeCssText
Methods 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:
true
if this list has no items,false
otherwise.
-
item
Retrieve aCSSValue
by ordinal index.- Parameters:
index
- the index in this list.- Returns:
- the value at
index
, ornull
ifindex
is 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:CSSValue
Get the general category to which this value belongs.- Specified by:
getCssValueType
in interfaceCSSValue
- Returns:
- the general value type.
-
getPrimitiveType
Description copied from interface:CSSValue
Get the primitive type.- Specified by:
getPrimitiveType
in interfaceCSSValue
- Returns:
- the primitive type.
-