java.lang.Object
- All Implemented Interfaces:
ExtendedCSSValue,ExtendedCSSValueList<StyleValue>,Serializable,Cloneable,Iterable<StyleValue>,Collection<StyleValue>,Deque<StyleValue>,List<StyleValue>,Queue<StyleValue>,CSSValue,CSSValueList
public class LinkedCSSValueList
extends LinkedList<StyleValue>
implements ExtendedCSSValueList<StyleValue>
Linked-list implementation of
ExtendedCSSValueList.- See Also:
-
Field Summary
Fields inherited from class java.util.AbstractList
modCountFields inherited from interface org.w3c.dom.css.CSSValue
CSS_CUSTOM, CSS_INHERIT, CSS_PRIMITIVE_VALUE, CSS_VALUE_LIST -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanadd(StyleValue value) Adds 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.shortintgetMinifiedCssText(String propertyName) Gives a minified version of the css text of the property, for the given property name.booleanisEmpty()Is this list empty ?item(int index) retrieve anExtendedCSSValueby ordinal index.set(int index, StyleValue value) Replaces the value at the specified index with the supplied value.voidsetCssText(String cssText) voidwriteCssText(SimpleWriter wri) Serialize this value to aSimpleWriter.Methods inherited from class java.util.LinkedList
add, addAll, addAll, addFirst, addLast, contains, descendingIterator, element, get, getFirst, getLast, indexOf, lastIndexOf, listIterator, offer, offerFirst, offerLast, peek, peekFirst, peekLast, poll, pollFirst, pollLast, pop, push, remove, remove, remove, removeFirst, removeFirstOccurrence, removeLast, removeLastOccurrence, size, spliterator, toArray, toArrayMethods inherited from class java.util.AbstractSequentialList
iteratorMethods inherited from class java.util.AbstractList
equals, hashCode, listIterator, removeRange, subListMethods inherited from class java.util.AbstractCollection
containsAll, removeAll, retainAll, toStringMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArrayMethods inherited from interface io.sf.carte.doc.style.css.ExtendedCSSValueList
removeMethods inherited from interface java.util.List
containsAll, equals, hashCode, iterator, listIterator, removeAll, replaceAll, retainAll, sort, subList
-
Constructor Details
-
LinkedCSSValueList
public LinkedCSSValueList()
-
-
Method Details
-
add
Adds a value to the end of this list.- Specified by:
addin interfaceCollection<StyleValue>- Specified by:
addin interfaceDeque<StyleValue>- Specified by:
addin interfaceExtendedCSSValueList<StyleValue>- Specified by:
addin interfaceList<StyleValue>- Specified by:
addin interfaceQueue<StyleValue>- Overrides:
addin classLinkedList<StyleValue>- Parameters:
value- the value to be added.- Returns:
true(for consistency with Java collections).
-
clear
public void clear()Removes all the items from this list.- Specified by:
clearin interfaceCollection<StyleValue>- Specified by:
clearin interfaceExtendedCSSValueList<StyleValue>- Specified by:
clearin interfaceList<StyleValue>- Overrides:
clearin classLinkedList<StyleValue>
-
isEmpty
public boolean isEmpty()Is this list empty ?- Specified by:
isEmptyin interfaceCollection<StyleValue>- Specified by:
isEmptyin interfaceExtendedCSSValueList<StyleValue>- Specified by:
isEmptyin interfaceList<StyleValue>- Overrides:
isEmptyin classAbstractCollection<StyleValue>- Returns:
trueif this list has no items,falseotherwise.
-
item
Description copied from interface:ExtendedCSSValueListretrieve anExtendedCSSValueby ordinal index.- Specified by:
itemin interfaceCSSValueList- Specified by:
itemin interfaceExtendedCSSValueList<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.
-
clone
Creates and returns a copy of this object.The list is cloned, but its contents are not.
- Specified by:
clonein interfaceExtendedCSSValue- Specified by:
clonein interfaceExtendedCSSValueList<StyleValue>- Overrides:
clonein classLinkedList<StyleValue>- Returns:
- a clone of this instance.
-
getLength
public int getLength()- Specified by:
getLengthin interfaceCSSValueList
-
getCssText
- Specified by:
getCssTextin interfaceCSSValue
-
getMinifiedCssText
Description copied from interface:ExtendedCSSValueGives a minified version of the css text of the property, for the given property name.- Specified by:
getMinifiedCssTextin interfaceExtendedCSSValue- Parameters:
propertyName- the property name.- Returns:
- the minified css text.
-
set
Replaces the value at the specified index with the supplied value.- Specified by:
setin interfaceExtendedCSSValueList<StyleValue>- Specified by:
setin interfaceList<StyleValue>- Overrides:
setin classLinkedList<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.
-
writeCssText
Description copied from interface:ExtendedCSSValueSerialize this value to aSimpleWriter.- Specified by:
writeCssTextin interfaceExtendedCSSValue- Parameters:
wri- the SimpleWriter.- Throws:
IOException- if an error happened while writing.
-
setCssText
- Specified by:
setCssTextin interfaceCSSValue- Throws:
DOMException
-
getCssValueType
public short getCssValueType()- Specified by:
getCssValueTypein interfaceCSSValue
-