Interface CollectionContractConfig
- All Known Subinterfaces:
AddAllContract<E,
,C> AddAtPositionContract<E,
,L> AddContract<E,
,C> AddFirstContract<E,
,C> AddLastContract<E,
,C> ClearContract<E,
,C> CollectionContract<E,
,C> CollectionContractSupport<E,
,C> ContainsAllContract<E,
,C> ContainsContract<E,
,C> DoesNotPermitDuplicates
,DoesNotPermitIncompatibleTypes
,DoesNotPermitNulls
,ForEachContract<E,
,I> GetContract<E,
,L> GetFirstContract<E,
,C> GetLastContract<E,
,C> IndexOfContract<E,
,L> IsEmptyContract<E,
,C> IterableContract<E,
,I> IteratorContract<E,
,I> LastIndexOfContract<E,
,L> ListAddContract<E,
,L> ListContract<E,
,L> ListToArrayContract<E,
,L> RemoveAllContract<E,
,C> RemoveAtPositionContract<E,
,L> RemoveContract<E,
,C> RemoveFirstContract<E,
,C> RemoveIfContract<E,
,C> RemoveLastContract<E,
,C> ReplaceAllContract<E,
,L> RetainAllContract<E,
,C> ReversedContract<E,
,C> SequencedCollectionContract<E,
,C> SetContract<E,
,L> SizeContract<E,
,C> SortContract<E,
,L> SpliteratorContract<E,
,I> StreamContract<E,
,C> SubListContract<E,
,L> ToArrayContract<E,
C>
public interface CollectionContractConfig
Interface for collection contract classes that allows tests to check some characteristics of the class being tested.
- Since:
- 1.0
- Author:
- evanbergstrom
-
Method Summary
Modifier and TypeMethodDescriptiondefault boolean
Determines if the collection permits duplicate values.default boolean
Determines if methods of this collection throw an exception when called with an object whose type is incompatible with the element type.default boolean
Determines if the collection being tested allows nulls.
-
Method Details
-
permitNulls
default boolean permitNulls()Determines if the collection being tested allows nulls.- Returns:
true
if the collection allows nulls,false
otherwise.
-
permitIncompatibleTypes
default boolean permitIncompatibleTypes()Determines if methods of this collection throw an exception when called with an object whose type is incompatible with the element type.- Returns:
true
if the collection throws for incompatible types,false
otherwise.
-
permitDuplicates
default boolean permitDuplicates()Determines if the collection permits duplicate values.- Returns:
true
if the collection permits duplicates,false
otherwise.
-