KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > org > apache > xerces > internal > xs > datatypes > ByteList


1 /*
2  * Copyright 2004,2005 The Apache Software Foundation.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16 package com.sun.org.apache.xerces.internal.xs.datatypes;
17
18 import com.sun.org.apache.xerces.internal.xs.XSException;
19
20 /**
21  * <p>The <code>ByteList</code> is an immutable ordered collection of
22  * <code>byte</code>.</p>
23  *
24  * @author Ankit Pasricha, IBM
25  *
26  * @version $Id: ByteList.java,v 1.2.6.1 2005/09/06 03:54:07 sunithareddy Exp $
27  */

28 public interface ByteList {
29     
30     /**
31      * The number of <code>byte</code>s in the list. The range of
32      * valid child object indices is 0 to <code>length-1</code> inclusive.
33      */

34     public int getLength();
35     
36     /**
37      * Checks if the <code>byte</code> <code>item</code> is a
38      * member of this list.
39      * @param item <code>byte</code> whose presence in this list
40      * is to be tested.
41      * @return True if this list contains the <code>byte</code>
42      * <code>item</code>.
43      */

44     public boolean contains(byte item);
45     
46     /**
47      * Returns the <code>index</code>th item in the collection. The index
48      * starts at 0.
49      * @param index index into the collection.
50      * @return The <code>byte</code> at the <code>index</code>th
51      * position in the <code>ByteList</code>.
52      * @exception XSException
53      * INDEX_SIZE_ERR: if <code>index</code> is greater than or equal to the
54      * number of objects in the list or less than zero.
55      */

56     public byte item(int index) throws XSException;
57     
58 }
59
Popular Tags