- All Superinterfaces:
CSSRuleList
,Iterable<T>
- All Known Implementing Classes:
CSSRuleArrayList
,MarginRuleList
A rule list with additional utility methods.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
Remove all the rules in this list.item
(int index) Retrieve a CSS rule by ordinal index.iterator()
Gives a minified parsable representation of this rule list.void
writeCssText
(SimpleWriter wri, StyleFormattingContext context) Write a serialization of this rule list to the given simple writer, according to the given context.Methods inherited from interface org.w3c.dom.css.CSSRuleList
getLength
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Method Details
-
clear
void clear()Remove all the rules in this list. -
item
Retrieve a CSS rule by ordinal index. The order in this collection represents the order of the rules in the CSS style sheet.- Specified by:
item
in interfaceCSSRuleList
- Parameters:
index
- the index in the collection.- Returns:
- the rule at the
index
position, ornull
if the index is less than zero or equal or greater to the list length.
-
iterator
-
toMinifiedString
String toMinifiedString()Gives a minified parsable representation of this rule list.- Returns:
- the minified rule list.
-
writeCssText
Write a serialization of this rule list to the given simple writer, according to the given context.- Parameters:
wri
- the simple writer object.context
- the formatting context.- Throws:
IOException
- if an error happened while writing.
-