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 booleanadd(T pItem)booleanaddAll(Collection<? extends T> pCollection)voidclear()booleancontains(Object pObj)booleancontainsAll(Collection<?> pCollection)intgetAddAllCnt()intgetAddCnt()intgetClearCnt()intgetContainsAllCnt()intgetContainsCnt()Map<String,Integer>getCounts()Map from operation name to number of invocations.protected Collection<T>getDelegate()intgetIsEmptyCnt()intgetIteratorCnt()intgetIteratorHasNextCnt()intgetIteratorNextCnt()intgetIteratorRemoveCnt()intgetRemoveAllCnt()intgetRemoveCnt()intgetRetainAllCnt()intgetSizeCnt()intgetToArrayCnt()intgetToArrayCnt2()booleanisEmpty()OpCountingIterator<T>iterator()booleanremove(Object pObj)booleanremoveAll(Collection<?> pCollection)booleanretainAll(Collection<?> pCollection)intsize()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:
getDelegatein classOpCountingObject
-
size
public int size()
- Specified by:
sizein interfaceCollection<T>
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmptyin interfaceCollection<T>
-
contains
public boolean contains(Object pObj)
- Specified by:
containsin interfaceCollection<T>
-
iterator
public OpCountingIterator<T> iterator()
-
toArray
public Object[] toArray()
- Specified by:
toArrayin interfaceCollection<T>
-
toArray
public <T1> T1[] toArray(T1[] pAry)
- Specified by:
toArrayin interfaceCollection<T>
-
add
public boolean add(T pItem)
- Specified by:
addin interfaceCollection<T>
-
remove
public boolean remove(Object pObj)
- Specified by:
removein interfaceCollection<T>
-
containsAll
public boolean containsAll(Collection<?> pCollection)
- Specified by:
containsAllin interfaceCollection<T>
-
addAll
public boolean addAll(Collection<? extends T> pCollection)
- Specified by:
addAllin interfaceCollection<T>
-
retainAll
public boolean retainAll(Collection<?> pCollection)
- Specified by:
retainAllin interfaceCollection<T>
-
removeAll
public boolean removeAll(Collection<?> pCollection)
- Specified by:
removeAllin interfaceCollection<T>
-
clear
public void clear()
- Specified by:
clearin interfaceCollection<T>
-
getCounts
public Map<String,Integer> getCounts()
Map from operation name to number of invocations.- Overrides:
getCountsin classOpCountingObject
-
-