Klasse GlobalIterableTool

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

public final class GlobalIterableTool extends Object
The GlobalIterableTool provides methods to handle Iterables. Of the GlobalIterableTool an instance cannot be created.
Version:
2017-12-16
Autor:
Silvan Wyss
  • Methodendetails

    • containsElement

      public static 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 static 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 static 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.
    • getElementCount

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

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