16 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 * See the License for the specific language governing permissions and
18 * limitations under the License.
19 */
20
21 package com.sun.org.apache.xerces.internal.impl.xs.util;
22
23 import java.lang.reflect.Array;
24 import java.util.AbstractList;
25 import java.util.Vector;
26
27 import com.sun.org.apache.xerces.internal.xs.StringList;
28
29 /**
30 * Containts a list of Object's.
31 *
32 * @xerces.internal
33 *
34 * @author Sandy Gao, IBM
35 *
36 * @version $Id: StringListImpl.java,v 1.7 2010-11-01 04:40:06 joehw Exp $
37 */
38 public final class StringListImpl extends AbstractList implements StringList {
39
40 /**
41 * An immutable empty list.
42 */
43 public static final StringListImpl EMPTY_LIST = new StringListImpl(new String[0], 0);
44
45 // The array to hold all data
46 private final String[] fArray;
47 // Number of elements in this list
48 private final int fLength;
49
50 // REVISIT: this is temp solution. In general we need to use this class
51 // instead of the Vector.
52 private final Vector fVector;
53
54 public StringListImpl(Vector v) {
55 fVector = v;
56 fLength = (v == null) ? 0 : v.size();
|
16 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 * See the License for the specific language governing permissions and
18 * limitations under the License.
19 */
20
21 package com.sun.org.apache.xerces.internal.impl.xs.util;
22
23 import java.lang.reflect.Array;
24 import java.util.AbstractList;
25 import java.util.Vector;
26
27 import com.sun.org.apache.xerces.internal.xs.StringList;
28
29 /**
30 * Containts a list of Object's.
31 *
32 * @xerces.internal
33 *
34 * @author Sandy Gao, IBM
35 *
36 */
37 public final class StringListImpl extends AbstractList implements StringList {
38
39 /**
40 * An immutable empty list.
41 */
42 public static final StringListImpl EMPTY_LIST = new StringListImpl(new String[0], 0);
43
44 // The array to hold all data
45 private final String[] fArray;
46 // Number of elements in this list
47 private final int fLength;
48
49 // REVISIT: this is temp solution. In general we need to use this class
50 // instead of the Vector.
51 private final Vector fVector;
52
53 public StringListImpl(Vector v) {
54 fVector = v;
55 fLength = (v == null) ? 0 : v.size();
|