Package jadex.collection
Class ConcurrencyCheckingList
java.lang.Object
jadex.collection.ConcurrencyCheckingList
- All Implemented Interfaces:
Serializable,Iterable,Collection,List,SequencedCollection
A wrapper for a list to detect undesired
concurrent access.
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbooleanbooleanaddAll(int index, Collection c) booleanaddAll(Collection c) voidclear()booleanbooleanprotected voidentry()Called for each method entry.protected voidexit()Called for each method exit.get(int index) intbooleanisEmpty()iterator()intlistIterator(int index) remove(int index) booleanbooleanbooleanintsize()subList(int fromIndex, int toIndex) Object[]toArray()Object[]Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArrayMethods inherited from interface java.util.List
addFirst, addLast, equals, getFirst, getLast, hashCode, removeFirst, removeLast, replaceAll, reversed, sort, spliterator
-
Field Details
-
list
The wrapped list. -
threads
A map for counting thread entries.
-
-
Constructor Details
-
ConcurrencyCheckingList
Wrap the given list.
-
-
Method Details
-
add
- Specified by:
addin interfaceCollection- Specified by:
addin interfaceList
-
add
-
addAll
- Specified by:
addAllin interfaceCollection- Specified by:
addAllin interfaceList
-
addAll
-
clear
public void clear()- Specified by:
clearin interfaceCollection- Specified by:
clearin interfaceList
-
contains
- Specified by:
containsin interfaceCollection- Specified by:
containsin interfaceList
-
containsAll
- Specified by:
containsAllin interfaceCollection- Specified by:
containsAllin interfaceList
-
get
-
indexOf
-
isEmpty
public boolean isEmpty()- Specified by:
isEmptyin interfaceCollection- Specified by:
isEmptyin interfaceList
-
iterator
-
lastIndexOf
- Specified by:
lastIndexOfin interfaceList
-
listIterator
- Specified by:
listIteratorin interfaceList
-
listIterator
- Specified by:
listIteratorin interfaceList
-
remove
-
remove
- Specified by:
removein interfaceCollection- Specified by:
removein interfaceList
-
removeAll
- Specified by:
removeAllin interfaceCollection- Specified by:
removeAllin interfaceList
-
retainAll
- Specified by:
retainAllin interfaceCollection- Specified by:
retainAllin interfaceList
-
set
-
size
public int size()- Specified by:
sizein interfaceCollection- Specified by:
sizein interfaceList
-
subList
-
toArray
- Specified by:
toArrayin interfaceCollection- Specified by:
toArrayin interfaceList
-
toArray
- Specified by:
toArrayin interfaceCollection- Specified by:
toArrayin interfaceList
-
entry
protected void entry()Called for each method entry. -
exit
protected void exit()Called for each method exit.
-