Class ObjectList<E>
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractList<E>
java.util.Vector<E>
simula.compiler.utilities.ObjectList<E>
- Type Parameters:
E
- the element type.
- All Implemented Interfaces:
Serializable
,Cloneable
,Iterable<E>
,Collection<E>
,List<E>
,RandomAccess
,SequencedCollection<E>
Utility class to hold a list of objects.
Link to GitHub: Source File.
- Author:
- Øystein Myhre Andersen
- See Also:
-
Field Summary
Fields inherited from class java.util.Vector
capacityIncrement, elementCount, elementData
Fields inherited from class java.util.AbstractList
modCount
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
static ObjectList
<?> read
(AttributeInputStream inpt) Read and return an ObjectList.static void
write
(ObjectList<?> list, AttributeOutputStream oupt) Write an ObjectList to a AttributeOutputStream.Methods inherited from class java.util.Vector
add, addAll, addAll, addElement, capacity, clear, clone, contains, containsAll, copyInto, elementAt, elements, ensureCapacity, equals, firstElement, forEach, get, hashCode, indexOf, indexOf, insertElementAt, isEmpty, iterator, lastElement, lastIndexOf, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeAllElements, removeElement, removeElementAt, removeIf, removeRange, replaceAll, retainAll, set, setElementAt, setSize, size, sort, spliterator, subList, toArray, toArray, toString, trimToSize
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Collection
parallelStream, stream, toArray
Methods inherited from interface java.util.List
addFirst, addLast, getFirst, getLast, removeFirst, removeLast, reversed
-
Constructor Details
-
ObjectList
public ObjectList()Default constructor.
-
-
Method Details
-
add
-
write
Write an ObjectList to a AttributeOutputStream.- Parameters:
list
- the list to be written.oupt
- the AttributeOutputStream to write to.- Throws:
IOException
- if something went wrong.
-
read
Read and return an ObjectList.- Parameters:
inpt
- the AttributeInputStream to read from- Returns:
- the ObjectList object read from the stream.
- Throws:
IOException
- if something went wrong.
-