info.informatica.doc.style.css.dom
Class CSSRuleArrayList

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractList<E>
          extended by java.util.ArrayList<org.w3c.dom.css.CSSRule>
              extended by info.informatica.doc.style.css.dom.CSSRuleArrayList
All Implemented Interfaces:
Serializable, Cloneable, Iterable<org.w3c.dom.css.CSSRule>, Collection<org.w3c.dom.css.CSSRule>, List<org.w3c.dom.css.CSSRule>, RandomAccess, org.w3c.dom.css.CSSRuleList

public class CSSRuleArrayList
extends ArrayList<org.w3c.dom.css.CSSRule>
implements org.w3c.dom.css.CSSRuleList

Stores a list of CSS rules, implementing CSSRuleList.

Author:
Carlos Amengual (amengual at informatica.info)
See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
CSSRuleArrayList()
           
CSSRuleArrayList(Collection<? extends org.w3c.dom.css.CSSRule> c)
           
CSSRuleArrayList(int initialCapacity)
           
 
Method Summary
 boolean add(org.w3c.dom.css.CSSRule o)
           
 int getLength()
          Gives the number of CSSRules in the list.
 int insertRule(org.w3c.dom.css.CSSRule cssrule, int index)
          Insert the given CSS rule at the given index.
 org.w3c.dom.css.CSSRule item(int index)
          Used to retrieve a CSS rule by ordinal index.
 String toString()
           
 
Methods inherited from class java.util.ArrayList
add, addAll, addAll, clear, clone, contains, ensureCapacity, get, indexOf, isEmpty, lastIndexOf, remove, remove, removeRange, set, size, toArray, toArray, trimToSize
 
Methods inherited from class java.util.AbstractList
equals, hashCode, iterator, listIterator, listIterator, subList
 
Methods inherited from class java.util.AbstractCollection
containsAll, removeAll, retainAll
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
containsAll, equals, hashCode, iterator, listIterator, listIterator, removeAll, retainAll, subList
 

Constructor Detail

CSSRuleArrayList

public CSSRuleArrayList(int initialCapacity)

CSSRuleArrayList

public CSSRuleArrayList()

CSSRuleArrayList

public CSSRuleArrayList(Collection<? extends org.w3c.dom.css.CSSRule> c)
Method Detail

getLength

public int getLength()
Gives the number of CSSRules in the list.

Specified by:
getLength in interface org.w3c.dom.css.CSSRuleList
Returns:
the number of CSSRules in the list. The range of valid child rule indices is 0 to length-1 inclusive.

item

public org.w3c.dom.css.CSSRule item(int index)
Used to retrieve a CSS rule by ordinal index. The order in this collection represents the order of the rules in the CSS style sheet. If index is greater than or equal to the number of rules in the list, this returns null.

Specified by:
item in interface org.w3c.dom.css.CSSRuleList
Parameters:
index - Index into the collection.
Returns:
The style rule at the index position in the CSSRuleList, or null if that is not a valid index.

insertRule

public int insertRule(org.w3c.dom.css.CSSRule cssrule,
                      int index)
Insert the given CSS rule at the given index.

Parameters:
cssrule - the rule.
index - the index at which to insert the rule.
Returns:
the index at which the rule was finally inserted.

add

public boolean add(org.w3c.dom.css.CSSRule o)
Specified by:
add in interface Collection<org.w3c.dom.css.CSSRule>
Specified by:
add in interface List<org.w3c.dom.css.CSSRule>
Overrides:
add in class ArrayList<org.w3c.dom.css.CSSRule>

toString

public String toString()
Overrides:
toString in class AbstractCollection<org.w3c.dom.css.CSSRule>


Copyright © 2011 informatica.info. All Rights Reserved.