Klasse IterableTool

java.lang.Object
ch.nolix.core.independent.containertool.IterableTool

public final class IterableTool extends Object
The IterableTool provides methods to handle Iterables.
Version:
2017-12-16
Autor:
Silvan Wyss
  • Konstruktordetails

    • IterableTool

      public IterableTool()
  • Methodendetails

    • containsElement

      public boolean containsElement(Iterable<?> iterable, Object element)
      Parameter:
      iterable -
      element -
      Gibt zurück:
      true if the given container contains the given element, false otherwise.
    • containsElementOnce

      public boolean containsElementOnce(Iterable<?> iterable, Object element)
      Parameter:
      iterable -
      element -
      Gibt zurück:
      true if the given iterable contains the given element exactly 1 time, false otherwise.
    • containsEqualing

      public boolean containsEqualing(Iterable<?> container, Object object)
      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

      public int getElementCount(Iterable<?> container)
      Parameter:
      container -
      Gibt zurück:
      the number of elements of the given container.
    • isEmpty

      public boolean isEmpty(Iterable<?> container)
      Parameter:
      container -
      Gibt zurück:
      true if the given container is not empty.