Module com.iamsoft.util.ui
Class OpCountingCollection<T>
- java.lang.Object
-
- com.iamsoft.util.ui.javafx.test.OpCountingObject
-
- com.iamsoft.util.ui.javafx.test.collections.OpCountingCollection<T>
-
- Type Parameters:
T
- Item type.
- All Implemented Interfaces:
Iterable<T>
,Collection<T>
- Direct Known Subclasses:
OpCountingSet
public class OpCountingCollection<T> extends OpCountingObject implements Collection<T>
-
-
Constructor Summary
Constructors Constructor Description OpCountingCollection(Collection<T> pDelegate)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
add(T pItem)
boolean
addAll(Collection<? extends T> pCollection)
void
clear()
boolean
contains(Object pObj)
boolean
containsAll(Collection<?> pCollection)
int
getAddAllCnt()
int
getAddCnt()
int
getClearCnt()
int
getContainsAllCnt()
int
getContainsCnt()
Map<String,Integer>
getCounts()
Map from operation name to number of invocations.protected Collection<T>
getDelegate()
int
getIsEmptyCnt()
int
getIteratorCnt()
int
getIteratorHasNextCnt()
int
getIteratorNextCnt()
int
getIteratorRemoveCnt()
int
getRemoveAllCnt()
int
getRemoveCnt()
int
getRetainAllCnt()
int
getSizeCnt()
int
getToArrayCnt()
int
getToArrayCnt2()
boolean
isEmpty()
OpCountingIterator<T>
iterator()
boolean
remove(Object pObj)
boolean
removeAll(Collection<?> pCollection)
boolean
retainAll(Collection<?> pCollection)
int
size()
Object[]
toArray()
<T1> T1[]
toArray(T1[] pAry)
-
Methods inherited from class com.iamsoft.util.ui.javafx.test.OpCountingObject
equals, getEqualsCnt, getHashCodeCnt, getToStringCnt, hashCode, toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Collection
equals, hashCode, parallelStream, removeIf, spliterator, stream, toArray
-
-
-
-
Constructor Detail
-
OpCountingCollection
public OpCountingCollection(Collection<T> pDelegate)
-
-
Method Detail
-
getSizeCnt
public int getSizeCnt()
-
getIsEmptyCnt
public int getIsEmptyCnt()
-
getContainsCnt
public int getContainsCnt()
-
getIteratorCnt
public int getIteratorCnt()
-
getToArrayCnt
public int getToArrayCnt()
-
getToArrayCnt2
public int getToArrayCnt2()
-
getAddCnt
public int getAddCnt()
-
getRemoveCnt
public int getRemoveCnt()
-
getContainsAllCnt
public int getContainsAllCnt()
-
getAddAllCnt
public int getAddAllCnt()
-
getRetainAllCnt
public int getRetainAllCnt()
-
getRemoveAllCnt
public int getRemoveAllCnt()
-
getClearCnt
public int getClearCnt()
-
getIteratorHasNextCnt
public int getIteratorHasNextCnt()
-
getIteratorNextCnt
public int getIteratorNextCnt()
-
getIteratorRemoveCnt
public int getIteratorRemoveCnt()
-
getDelegate
protected Collection<T> getDelegate()
- Overrides:
getDelegate
in classOpCountingObject
-
size
public int size()
- Specified by:
size
in interfaceCollection<T>
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty
in interfaceCollection<T>
-
contains
public boolean contains(Object pObj)
- Specified by:
contains
in interfaceCollection<T>
-
iterator
public OpCountingIterator<T> iterator()
-
toArray
public Object[] toArray()
- Specified by:
toArray
in interfaceCollection<T>
-
toArray
public <T1> T1[] toArray(T1[] pAry)
- Specified by:
toArray
in interfaceCollection<T>
-
add
public boolean add(T pItem)
- Specified by:
add
in interfaceCollection<T>
-
remove
public boolean remove(Object pObj)
- Specified by:
remove
in interfaceCollection<T>
-
containsAll
public boolean containsAll(Collection<?> pCollection)
- Specified by:
containsAll
in interfaceCollection<T>
-
addAll
public boolean addAll(Collection<? extends T> pCollection)
- Specified by:
addAll
in interfaceCollection<T>
-
retainAll
public boolean retainAll(Collection<?> pCollection)
- Specified by:
retainAll
in interfaceCollection<T>
-
removeAll
public boolean removeAll(Collection<?> pCollection)
- Specified by:
removeAll
in interfaceCollection<T>
-
clear
public void clear()
- Specified by:
clear
in interfaceCollection<T>
-
getCounts
public Map<String,Integer> getCounts()
Map from operation name to number of invocations.- Overrides:
getCounts
in classOpCountingObject
-
-