Package com.strobel.assembler
Class Collection<E>
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractList<E>
com.strobel.assembler.Collection<E>
- All Implemented Interfaces:
IFreezable
,Iterable<E>
,Collection<E>
,List<E>
,SequencedCollection<E>
- Direct Known Subclasses:
AnonymousLocalTypeCollection
,GenericParameterCollection
,InstructionCollection
,ParameterDefinitionCollection
,VariableDefinitionCollection
-
Field Summary
FieldsFields inherited from class java.util.AbstractList
modCount
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
final boolean
protected final void
protected void
protected void
afterRemove
(int index, E e) protected void
protected void
boolean
final void
clear()
final void
freeze()
final void
freeze
(boolean freezeContents) protected void
freezeCore
(boolean freezeContents) final void
final E
get
(int index) final boolean
isFrozen()
final E
remove
(int index) final boolean
final E
final int
size()
final boolean
protected final void
protected final void
Methods inherited from class java.util.AbstractList
addAll, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, removeRange, subList
Methods inherited from class java.util.AbstractCollection
addAll, contains, containsAll, isEmpty, removeAll, retainAll, toArray, toArray, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
Methods inherited from interface java.util.List
addAll, addFirst, addLast, contains, containsAll, getFirst, getLast, isEmpty, removeAll, removeFirst, removeLast, replaceAll, retainAll, reversed, sort, spliterator, toArray, toArray
-
Field Details
-
_items
-
_isFrozen
private boolean _isFrozen
-
-
Constructor Details
-
Collection
public Collection()
-
-
Method Details
-
size
public final int size()- Specified by:
size
in interfaceCollection<E>
- Specified by:
size
in interfaceList<E>
- Specified by:
size
in classAbstractCollection<E>
-
get
-
add
- Specified by:
add
in interfaceCollection<E>
- Specified by:
add
in interfaceList<E>
- Overrides:
add
in classAbstractList<E>
-
set
-
add
-
addCore
-
remove
-
clear
public final void clear()- Specified by:
clear
in interfaceCollection<E>
- Specified by:
clear
in interfaceList<E>
- Overrides:
clear
in classAbstractList<E>
-
remove
- Specified by:
remove
in interfaceCollection<E>
- Specified by:
remove
in interfaceList<E>
- Overrides:
remove
in classAbstractCollection<E>
-
afterAdd
-
beforeSet
-
afterRemove
-
beforeClear
protected void beforeClear() -
canFreeze
public boolean canFreeze()- Specified by:
canFreeze
in interfaceIFreezable
-
isFrozen
public final boolean isFrozen()- Specified by:
isFrozen
in interfaceIFreezable
-
freeze
public final void freeze()- Specified by:
freeze
in interfaceIFreezable
-
freeze
public final void freeze(boolean freezeContents) -
freezeCore
protected void freezeCore(boolean freezeContents) -
verifyNotFrozen
protected final void verifyNotFrozen() -
verifyFrozen
protected final void verifyFrozen() -
tryFreeze
public final boolean tryFreeze()- Specified by:
tryFreeze
in interfaceIFreezable
-
freezeIfUnfrozen
- Specified by:
freezeIfUnfrozen
in interfaceIFreezable
- Throws:
IllegalStateException
-