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 TypeMethodDescriptionvoid
boolean
boolean
addAll
(int index, Collection c) boolean
addAll
(Collection c) void
clear()
boolean
boolean
protected void
entry()
Called for each method entry.protected void
exit()
Called for each method exit.get
(int index) int
boolean
isEmpty()
iterator()
int
listIterator
(int index) remove
(int index) boolean
boolean
boolean
int
size()
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, wait
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
Methods 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:
add
in interfaceCollection
- Specified by:
add
in interfaceList
-
add
-
addAll
- Specified by:
addAll
in interfaceCollection
- Specified by:
addAll
in interfaceList
-
addAll
-
clear
public void clear()- Specified by:
clear
in interfaceCollection
- Specified by:
clear
in interfaceList
-
contains
- Specified by:
contains
in interfaceCollection
- Specified by:
contains
in interfaceList
-
containsAll
- Specified by:
containsAll
in interfaceCollection
- Specified by:
containsAll
in interfaceList
-
get
-
indexOf
-
isEmpty
public boolean isEmpty()- Specified by:
isEmpty
in interfaceCollection
- Specified by:
isEmpty
in interfaceList
-
iterator
-
lastIndexOf
- Specified by:
lastIndexOf
in interfaceList
-
listIterator
- Specified by:
listIterator
in interfaceList
-
listIterator
- Specified by:
listIterator
in interfaceList
-
remove
-
remove
- Specified by:
remove
in interfaceCollection
- Specified by:
remove
in interfaceList
-
removeAll
- Specified by:
removeAll
in interfaceCollection
- Specified by:
removeAll
in interfaceList
-
retainAll
- Specified by:
retainAll
in interfaceCollection
- Specified by:
retainAll
in interfaceList
-
set
-
size
public int size()- Specified by:
size
in interfaceCollection
- Specified by:
size
in interfaceList
-
subList
-
toArray
- Specified by:
toArray
in interfaceCollection
- Specified by:
toArray
in interfaceList
-
toArray
- Specified by:
toArray
in interfaceCollection
- Specified by:
toArray
in interfaceList
-
entry
protected void entry()Called for each method entry. -
exit
protected void exit()Called for each method exit.
-