Here you can find the source of castToIntegerArray(Object[] array)
Parameter | Description |
---|---|
array | a parameter |
public static Integer[] castToIntegerArray(Object[] array)
//package com.java2s; /*// ww w .ja v a 2s. c o m Pulsar Copyright (C) 2013-2015 eBay Software Foundation Licensed under the GPL v2 license. See LICENSE for full terms. */ public class Main { /** * EPL has embedded cast method, but it doesn't cover arrays * * @param array * @return */ public static Integer[] castToIntegerArray(Object[] array) { if (array != null) { Integer[] retArray = new Integer[array.length]; int i = 0; for (Object element : array) { retArray[i] = element == null ? null : (Integer) element; i++; } return retArray; } return null; } }