14 *
15 * Unless required by applicable law or agreed to in writing, software
16 * distributed under the License is distributed on an "AS IS" BASIS,
17 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18 * See the License for the specific language governing permissions and
19 * limitations under the License.
20 */
21
22 package com.sun.org.apache.xerces.internal.impl.xs.util;
23
24 import java.lang.reflect.Array;
25 import java.util.AbstractList;
26
27 import com.sun.org.apache.xerces.internal.xs.datatypes.ObjectList;
28
29 /**
30 * Contains a list of Objects.
31 *
32 * @xerces.internal
33 *
34 * @version $Id: ObjectListImpl.java,v 1.2 2010-10-26 23:01:04 joehw Exp $
35 */
36 public final class ObjectListImpl extends AbstractList implements ObjectList {
37
38 /**
39 * An immutable empty list.
40 */
41 public static final ObjectListImpl EMPTY_LIST = new ObjectListImpl(new Object[0], 0);
42
43 // The array to hold all data
44 private final Object[] fArray;
45
46 // Number of elements in this list
47 private final int fLength;
48
49 public ObjectListImpl(Object[] array, int length) {
50 fArray = array;
51 fLength = length;
52 }
53
54 public int getLength() {
|
14 *
15 * Unless required by applicable law or agreed to in writing, software
16 * distributed under the License is distributed on an "AS IS" BASIS,
17 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18 * See the License for the specific language governing permissions and
19 * limitations under the License.
20 */
21
22 package com.sun.org.apache.xerces.internal.impl.xs.util;
23
24 import java.lang.reflect.Array;
25 import java.util.AbstractList;
26
27 import com.sun.org.apache.xerces.internal.xs.datatypes.ObjectList;
28
29 /**
30 * Contains a list of Objects.
31 *
32 * @xerces.internal
33 *
34 */
35 public final class ObjectListImpl extends AbstractList implements ObjectList {
36
37 /**
38 * An immutable empty list.
39 */
40 public static final ObjectListImpl EMPTY_LIST = new ObjectListImpl(new Object[0], 0);
41
42 // The array to hold all data
43 private final Object[] fArray;
44
45 // Number of elements in this list
46 private final int fLength;
47
48 public ObjectListImpl(Object[] array, int length) {
49 fArray = array;
50 fLength = length;
51 }
52
53 public int getLength() {
|