Module org.firebirdsql.jaybird
Package org.firebirdsql.jaybird.util

# Class Primitives

java.lang.Object
org.firebirdsql.jaybird.util.Primitives

public final class Primitives extends Object
Helper methods for conversion to or from primitive values.

Since:
  5
Author:
  Mark Rotteveel

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static int[]`
  `toIntArray(List<? extends Number> numbers)`
  Convert list of numbers into array of `int`.
  `static long[]`
  `toLongArray(List<? extends Number> longObjects)`
  Convert list of numbers into array of `long`.
  `static List<Long>`
  `toLongList(int[] intValues)`
  Convert array of `int` to list of `Long`.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Method Details

  - ### toIntArray

    public static int[] toIntArray(List<? extends Number> numbers)
    Convert list of numbers into array of `int`.
    Parameters:
      `numbers` - list of numbers
    Returns:
      array of `int`

  - ### toLongArray

    public static long[] toLongArray(List<? extends Number> longObjects)
    Convert list of numbers into array of `long`.
    Parameters:
      `longObjects` - list of numbers
    Returns:
      array of `long`

  - ### toLongList

    public static List<Long> toLongList(int[] intValues)
    Convert array of `int` to list of `Long`.
    Parameters:
      `intValues` - array of `int`
    Returns:
      list of `Long`