Package ptolemy.caltrop.util
Class PtArrayList
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractList<Token>
-
- ptolemy.caltrop.util.PtArrayList
-
- All Implemented Interfaces:
java.lang.Iterable<Token>
,java.util.Collection<Token>
,java.util.List<Token>
public class PtArrayList extends java.util.AbstractList<Token>
A List representation of an ArrayToken.- Since:
- Ptolemy II 4.0
- Version:
- $Id$
- Author:
- Jörn W. Janneck
- Pt.AcceptedRating:
- Red (cxh)
- Pt.ProposedRating:
- Red (cxh)
-
-
Constructor Summary
Constructors Constructor Description PtArrayList(ArrayToken arrayToken)
Construct a PtArrayList from an ArrayToken.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Token
get(int index)
Get the token at the given index.int
size()
Return the size of the array.-
Methods inherited from class java.util.AbstractList
add, add, addAll, clear, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, removeRange, set, subList
-
Methods inherited from class java.util.AbstractCollection
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toString
-
-
-
-
Constructor Detail
-
PtArrayList
public PtArrayList(ArrayToken arrayToken)
Construct a PtArrayList from an ArrayToken.- Parameters:
arrayToken
- The arrayToken with which to construct the List.
-
-
Method Detail
-
get
public Token get(int index) throws java.lang.ArrayIndexOutOfBoundsException
Get the token at the given index. The type of the return- Specified by:
get
in interfacejava.util.List<Token>
- Specified by:
get
in classjava.util.AbstractList<Token>
- Parameters:
index
- The index of the desired element.- Returns:
- The token contained in this array token at the specified index.
- Throws:
java.lang.ArrayIndexOutOfBoundsException
- If the specified index is outside the range of the token array.
-
-