001    /*
002     * Copyright (c) 2000 World Wide Web Consortium,
003     * (Massachusetts Institute of Technology, Institut National de
004     * Recherche en Informatique et en Automatique, Keio University). All
005     * Rights Reserved. This program is distributed under the W3C's Software
006     * Intellectual Property License. This program is distributed in the
007     * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
008     * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
009     * PURPOSE.
010     * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
011     */
012    
013    package org.w3c.dom.css;
014    
015    /**
016     * The <code>CSSValueList</code> interface provides the abstraction of an
017     * ordered collection of CSS values.
018     * <p> Some properties allow an empty list into their syntax. In that case,
019     * these properties take the <code>none</code> identifier. So, an empty list
020     * means that the property has the value <code>none</code>.
021     * <p> The items in the <code>CSSValueList</code> are accessible via an
022     * integral index, starting from 0.
023     * <p>See also the <a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Style-20001113'>Document Object Model (DOM) Level 2 Style Specification</a>.
024     * @since DOM Level 2
025     */
026    public interface CSSValueList extends CSSValue {
027        /**
028         * The number of <code>CSSValues</code> in the list. The range of valid
029         * values of the indices is <code>0</code> to <code>length-1</code>
030         * inclusive.
031         */
032        public int getLength();
033    
034        /**
035         * Used to retrieve a <code>CSSValue</code> by ordinal index. The order in
036         * this collection represents the order of the values in the CSS style
037         * property. If index is greater than or equal to the number of values
038         * in the list, this returns <code>null</code>.
039         * @param index Index into the collection.
040         * @return The <code>CSSValue</code> at the <code>index</code> position
041         *   in the <code>CSSValueList</code>, or <code>null</code> if that is
042         *   not a valid index.
043         */
044        public CSSValue item(int index);
045    
046    }