Klasse GlobalArrayTool

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

public final class GlobalArrayTool extends Object
The GlobalArrayTool provides functions to handle arrays. Of the GlobalArrayTool class an instance cannot be created.
Version:
2017-08-14
Autor:
Silvan Wyss
  • Methodendetails

    • createArrayWithElement

      public static <E> E[] createArrayWithElement(E element, E... elements)
      Typparameter:
      E - is the type of the given firstElement and of the given elements.
      Parameter:
      element -
      elements -
      Gibt zurück:
      a new array with the given firstElement and elements.
    • createArrayWithValue

      public static double[] createArrayWithValue(double value, double... values)
      Parameter:
      value -
      values -
      Gibt zurück:
      a new array with the given values.
    • createIterable

      public static Iterable<Byte> createIterable(byte[] values)
      Creates a new iterable object with the given values.
      Parameter:
      values -
      Gibt zurück:
      a new iterable object with the given values.
      Löst aus:
      IllegalArgumentException - if the given values is null.
    • createIterable

      public static Iterable<Double> createIterable(double[] values)
      Creates a new iterable object with the given values.
      Parameter:
      values -
      Gibt zurück:
      a new iterable object with the given values.
      Löst aus:
      IllegalArgumentException - if the given values is null.
    • createIterable

      public static <E> Iterable<E> createIterable(E[] elements)
      Creates a new iterable object with the given elements.
      Typparameter:
      E - is the type of the given elements.
      Parameter:
      elements -
      Gibt zurück:
      a new iterable object with the given elements.
      Löst aus:
      IllegalArgumentException - if the given elements is null.
    • createIterable

      public static <E> Iterable<E> createIterable(Iterable<E> elements, E additionalElement)
      Creates a new iterable object with the given elements.
      Typparameter:
      E - is the type of the given elements and additionalElement.
      Parameter:
      elements -
      additionalElement -
      Gibt zurück:
      a new iterable object with the given elements and additional element.
      Löst aus:
      IllegalArgumentException - if the given elements is null.
    • createIterable

      public static Iterable<Long> createIterable(int[] values)
      Creates a new iterable object with the given values.
      Parameter:
      values -
      Gibt zurück:
      a new iterable object with the given values.
      Löst aus:
      IllegalArgumentException - if the given values is null.
    • createIterable

      public static Iterable<Long> createIterable(long[] values)
      Creates a new iterable object with the given values.
      Parameter:
      values -
      Gibt zurück:
      a new iterable object with the given values.
      Löst aus:
      IllegalArgumentException - if the given values is null.
    • createString

      public static String createString(double[] values)
      Parameter:
      values -
      Gibt zurück:
      a String representation of the given values.
      Löst aus:
      IllegalArgumentException - if the given values is null.
    • createString

      public static String createString(int[] values)
      Parameter:
      values -
      Gibt zurück:
      a String representation of the given values.
      Löst aus:
      IllegalArgumentException - if the given values is null.
    • createString

      public static String createString(long[] values)
      Parameter:
      values -
      Gibt zurück:
      a String representation of the given values.
      Löst aus:
      IllegalArgumentException - if the given values is null.