Klasse IterableTool
java.lang.Object
ch.nolix.core.independent.containertool.IterableTool
The
IterableTool
provides methods to handle Iterable
s.- Version:
- 2017-12-16
- Autor:
- Silvan Wyss
-
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungboolean
containsElement
(Iterable<?> iterable, Object element) boolean
containsElementOnce
(Iterable<?> iterable, Object element) boolean
containsEqualing
(Iterable<?> container, Object object) boolean
containsExactlyOneWithStringRepresentation
(Iterable<?> iterable, String stringRepresentation) int
getElementCount
(Iterable<?> container) boolean
-
Konstruktordetails
-
IterableTool
public IterableTool()
-
-
Methodendetails
-
containsElement
- Parameter:
iterable
-element
-- Gibt zurück:
- true if the given container contains the given element, false otherwise.
-
containsElementOnce
- Parameter:
iterable
-element
-- Gibt zurück:
- true if the given iterable contains the given element exactly 1 time, false otherwise.
-
containsEqualing
- Parameter:
container
-object
-- Gibt zurück:
- true if the given container contains an element that equals the given object.
-
containsExactlyOneWithStringRepresentation
public boolean containsExactlyOneWithStringRepresentation(Iterable<?> iterable, String stringRepresentation) - Parameter:
iterable
-stringRepresentation
-- Gibt zurück:
- true if the given iterable contains exactly 1 element with the given stringRepresentation
-
getElementCount
- Parameter:
container
-- Gibt zurück:
- the number of elements of the given container.
-
isEmpty
- Parameter:
container
-- Gibt zurück:
- true if the given container is not empty.
-