Class IterableExaminer
java.lang.Object
ch.nolix.base.independent.iterabletool.IterableExaminer
- All Implemented Interfaces:
IIterableExaminer
- Author:
- Silvan Wyss
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancontainsElement(Iterable<?> iterable, Object element) booleancontainsElementMultipleTimes(Iterable<?> iterable, Object element) booleancontainsElementOnce(Iterable<?> iterable, Object element) booleancontainsExactlyOneWithStringRepresentation(Iterable<?> iterable, String stringRepresentation) boolean
-
Constructor Details
-
IterableExaminer
public IterableExaminer()
-
-
Method Details
-
containsElement
- Specified by:
containsElementin interfaceIIterableExaminer- Parameters:
iterable-element-- Returns:
- true if the given iterable contains the given element, false otherwise.
-
containsElementMultipleTimes
- Specified by:
containsElementMultipleTimesin interfaceIIterableExaminer- Parameters:
iterable-element-- Returns:
- true if the given iterable contains the given element multiple times, false otherwise.
-
containsElementOnce
- Specified by:
containsElementOncein interfaceIIterableExaminer- Parameters:
iterable-element-- Returns:
- true if the given iterable contains the given element exactly 1 time, false otherwise.
-
containsExactlyOneWithStringRepresentation
public boolean containsExactlyOneWithStringRepresentation(Iterable<?> iterable, String stringRepresentation) - Specified by:
containsExactlyOneWithStringRepresentationin interfaceIIterableExaminer- Parameters:
iterable-stringRepresentation-- Returns:
- true if the given iterable contains exactly 1 element with the given stringRepresentation, false otherwise.
-
isEmpty
- Specified by:
isEmptyin interfaceIIterableExaminer- Parameters:
iterable-- Returns:
- true if the given iterable is empty, false otherwise.
-