Package io.sf.carte.doc.style.css.nsac
Interface SelectorList
List of selectors.
Based on SAC's SelectorList interface by Philippe Le Hegaret.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanCheck id this list contains the given selector.booleancontainsAll(SelectorList list) Returnstrueif this list contains all of the selectors in the given list.intGet the length of this selector list.item(int index) Get the selector at the specified index.default SelectorReplace the selector atindexwith the given selector.Methods inherited from interface java.lang.Iterable
forEach, iterator, spliterator
-
Method Details
-
contains
Check id this list contains the given selector.Comparisons are made according to the
equals()method.- Parameters:
selector- the selector.- Returns:
trueif this list contains the selector.
-
containsAll
Returnstrueif this list contains all of the selectors in the given list.- Parameters:
list- the list to check.- Returns:
trueif this list contains all of the selectors in the list.
-
getLength
int getLength()Get the length of this selector list.- Returns:
- the length of this selector list, zero if empty.
-
item
Get the selector at the specified index.- Returns:
- the selector at the specified index, or
nullif the index is not valid.
-
replace
Replace the selector atindexwith the given selector.This method is not intended to trigger any event, so if you modify a a selector belonging to a rule obtained from the DOM, it is your responsibility to update the styles of the document.
- Parameters:
index- the index at which the selector has to be replaced.selector- the new selector.- Returns:
- the replaced selector.
- Throws:
DOMException- INDEX_SIZE_ERR if theindexis less than zero or greater than the largest possible index.
NO_MODIFICATION_ALLOWED_ERR if replacing selectors is not allowed.NullPointerException- ifselectorisnull.
-