Java Utililty Methods Object Create

List of utility methods to do Object Create

Description

The list of methods to do Object Create are organized into topic(s).

Method

Integer[]toObject(int[] array)
Converts a int array to a Integer array.
if (array.length == 0) {
    return EMPTY_INTEGER_OBJECT_ARRAY;
Integer[] result = new Integer[array.length];
for (int i = 0; i < array.length; i++) {
    result[i] = array[i];
return result;
...
Integer[]toObject(int[] values)
Converts an int array into an Integer array.
Integer[] vector = new Integer[values.length];
for (int i = 0; i < vector.length; i++) {
    vector[i] = i;
return vector;
Long[]toObject(long[] array)
to Object
Long[] ret = new Long[array.length];
for (int i = 0; i < array.length; i++) {
    ret[i] = array[i];
return ret;
ObjecttoObject(Object value)
to Object
return toObject(value, null);
ObjecttoObject(short s)
to Object
return new Short(s);
ShorttoObject(short value)
Wraps an short with an Object wrapper.
return new Short(value);