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
modCount
Fields inherited from interface org.w3c.dom.css.CSSValue
CSS_CUSTOM, CSS_INHERIT, CSS_PRIMITIVE_VALUE, CSS_VALUE_LIST
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
add
(StyleValue value) 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.short
int
getMinifiedCssText
(String propertyName) Gives a minified version of the css text of the property, for the given property name.boolean
isEmpty()
Is this list empty ?item
(int index) retrieve anExtendedCSSValue
by ordinal index.set
(int index, StyleValue value) Replaces the value at the specified index with the supplied value.void
setCssText
(String cssText) void
writeCssText
(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, toArray
Methods inherited from class java.util.AbstractSequentialList
iterator
Methods inherited from class java.util.AbstractList
equals, hashCode, listIterator, removeRange, subList
Methods inherited from class java.util.AbstractCollection
containsAll, removeAll, retainAll, toString
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
Methods inherited from interface io.sf.carte.doc.style.css.ExtendedCSSValueList
remove
Methods 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:
add
in interfaceCollection<StyleValue>
- Specified by:
add
in interfaceDeque<StyleValue>
- Specified by:
add
in interfaceExtendedCSSValueList<StyleValue>
- Specified by:
add
in interfaceList<StyleValue>
- Specified by:
add
in interfaceQueue<StyleValue>
- Overrides:
add
in 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:
clear
in interfaceCollection<StyleValue>
- Specified by:
clear
in interfaceExtendedCSSValueList<StyleValue>
- Specified by:
clear
in interfaceList<StyleValue>
- Overrides:
clear
in classLinkedList<StyleValue>
-
isEmpty
public boolean isEmpty()Is this list empty ?- Specified by:
isEmpty
in interfaceCollection<StyleValue>
- Specified by:
isEmpty
in interfaceExtendedCSSValueList<StyleValue>
- Specified by:
isEmpty
in interfaceList<StyleValue>
- Overrides:
isEmpty
in classAbstractCollection<StyleValue>
- Returns:
true
if this list has no items,false
otherwise.
-
item
Description copied from interface:ExtendedCSSValueList
retrieve anExtendedCSSValue
by ordinal index.- Specified by:
item
in interfaceCSSValueList
- Specified by:
item
in interfaceExtendedCSSValueList<StyleValue>
- 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.
-
clone
Creates and returns a copy of this object.The list is cloned, but its contents are not.
- Specified by:
clone
in interfaceExtendedCSSValue
- Specified by:
clone
in interfaceExtendedCSSValueList<StyleValue>
- Overrides:
clone
in classLinkedList<StyleValue>
- Returns:
- a clone of this instance.
-
getLength
public int getLength()- Specified by:
getLength
in interfaceCSSValueList
-
getCssText
- Specified by:
getCssText
in interfaceCSSValue
-
getMinifiedCssText
Description copied from interface:ExtendedCSSValue
Gives a minified version of the css text of the property, for the given property name.- Specified by:
getMinifiedCssText
in 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:
set
in interfaceExtendedCSSValueList<StyleValue>
- Specified by:
set
in interfaceList<StyleValue>
- Overrides:
set
in 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:ExtendedCSSValue
Serialize this value to aSimpleWriter
.- Specified by:
writeCssText
in interfaceExtendedCSSValue
- Parameters:
wri
- the SimpleWriter.- Throws:
IOException
- if an error happened while writing.
-
setCssText
- Specified by:
setCssText
in interfaceCSSValue
- Throws:
DOMException
-
getCssValueType
public short getCssValueType()- Specified by:
getCssValueType
in interfaceCSSValue
-