Java Integer Convert To convertIntArray(int[] arr)

Here you can find the source of convertIntArray(int[] arr)

Description

convert Int Array

License

Open Source License

Declaration

public static Integer[] convertIntArray(int[] arr) 

Method Source Code

//package com.java2s;
/*/*from   w  w  w  .j  a  va2 s. c o  m*/
 * PortUtil.cs
 * Copyright ? 2009-2011 kbinani
 *
 * This file is part of org.kbinani.
 *
 * org.kbinani is free software; you can redistribute it and/or
 * modify it under the terms of the BSD License.
 *
 * org.kbinani is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 */

public class Main {
    public static Integer[] convertIntArray(int[] arr) {
        Integer[] ret = new Integer[arr.length];

        for (int i = 0; i < arr.length; i++) {
            ret[i] = arr[i];
        }

        return ret;
    }

    public static int[] convertIntArray(Integer[] arr) {
        int[] ret = new int[arr.length];

        for (int i = 0; i < arr.length; i++) {
            ret[i] = arr[i];
        }

        return ret;
    }
}

Related

  1. convertInt(String[] idArray)
  2. convertInt2Byte(int data)
  3. convertInt2Bytes(int data)
  4. convertInt32(int v, boolean isLE)
  5. convertInt8(int v)
  6. convertIntArray(int[] in)
  7. convertIntArrayFromHex(char[] hex)
  8. convertIntBitsMSBinaryToIEEE(int source)
  9. convertIntColourToByteArray(int intColour)