- All Implemented Interfaces:
Serializable
,Cloneable
,Iterable<Declaration>
,Collection<Declaration>
,List<Declaration>
,RandomAccess
,SequencedCollection<Declaration>
Declaration List.
This is a utility class to hold local declaration lists in declaration scopes.
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
-
Method Summary
Modifier and TypeMethodDescriptionboolean
add
(Declaration dcl) Add a declaration to this list.Find a declaration in this DeclarationListvoid
Utility print method.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
-
Field Details
-
identifier
Identifier.
-
-
Constructor Details
-
DeclarationList
Create a new DeclarationList.- Parameters:
identifier
- the given identifier
-
-
Method Details
-
find
Find a declaration in this DeclarationList- Parameters:
identifier
- declaration identifier- Returns:
- the resulting Declaration
-
add
Add a declaration to this list.- Specified by:
add
in interfaceCollection<Declaration>
- Specified by:
add
in interfaceList<Declaration>
- Overrides:
add
in classVector<Declaration>
-
print
Utility print method.- Parameters:
title
- the title
-