Here you can find the source of castToLongArray(Object[] array)
Parameter | Description |
---|---|
array | a parameter |
public static Long[] castToLongArray(Object[] array)
//package com.java2s; /*/* w ww . j av a2s .c om*/ 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 Long[] castToLongArray(Object[] array) { if (array != null) { Long[] retArray = new Long[array.length]; int i = 0; for (Object element : array) { retArray[i] = element == null ? null : (Long) element; i++; } return retArray; } return null; } }