Example usage for org.apache.commons.lang ArrayUtils EMPTY_INTEGER_OBJECT_ARRAY

List of usage examples for org.apache.commons.lang ArrayUtils EMPTY_INTEGER_OBJECT_ARRAY

Introduction

In this page you can find the example usage for org.apache.commons.lang ArrayUtils EMPTY_INTEGER_OBJECT_ARRAY.

Prototype

Integer[] EMPTY_INTEGER_OBJECT_ARRAY

To view the source code for org.apache.commons.lang ArrayUtils EMPTY_INTEGER_OBJECT_ARRAY.

Click Source Link

Document

An empty immutable Integer array.

Usage

From source file:edu.utah.further.core.api.collections.ArrayUtil.java

/**
 * @param list/* w w w  .  jav a2 s .c  o m*/
 * @return
 */
public static int[] intListToPrimitiveArray(final List<Integer> list) {
    return ArrayUtils.toPrimitive(list.toArray(ArrayUtils.EMPTY_INTEGER_OBJECT_ARRAY));
}

From source file:de.iteratec.iteraplan.presentation.dialog.common.model.businessmapping.NewBusinessMappingComponentModelPart.java

/**
 * Moves selected information system releases from the available list to the connected list. Selected systems are
 * identified by the ID array that the browser sent. That array is cleared after systems were moved.
 *///w w  w .j a  va2 s.c om
private void addIsrs() {
    for (Integer id : this.isrToAdd) {
        InformationSystemRelease isr = this.availableIsrs.getWithKey(id);
        availableIsrs.removeWithKey(isr.getId());
        connectedIsrs.addWithKey(isr, isr.getId());
    }

    isrToAdd = ArrayUtils.EMPTY_INTEGER_OBJECT_ARRAY;
}

From source file:de.iteratec.iteraplan.presentation.dialog.common.model.businessmapping.NewBusinessMappingComponentModelPart.java

/**
 * Moves selected processes from the available list to the connected list. Selected processes are
 * identified by the ID array that the browser sent. That array is cleared after processes were moved.
 *//*from w  w  w. j a v  a  2s  . c  o  m*/
private void addBps() {
    for (Integer id : this.bpToAdd) {
        BusinessProcess bp = this.availableBps.getWithKey(id);
        availableBps.removeWithKey(bp.getId());
        connectedBps.addWithKey(bp, bp.getId());
    }

    bpToAdd = ArrayUtils.EMPTY_INTEGER_OBJECT_ARRAY;
}

From source file:de.iteratec.iteraplan.presentation.dialog.common.model.businessmapping.NewBusinessMappingComponentModelPart.java

/**
 * Moves selected business units from the available list to the connected list. Selected business units are
 * identified by the ID array that the browser sent. That array is cleared after business units were moved.
 *//*from  w  ww. j  a v a2 s .c  om*/
private void addBus() {
    for (Integer id : this.buToAdd) {
        BusinessUnit bu = this.availableBusinessUnits.getWithKey(id);
        availableBusinessUnits.removeWithKey(bu.getId());
        connectedBusinessUnits.addWithKey(bu, bu.getId());
    }

    buToAdd = ArrayUtils.EMPTY_INTEGER_OBJECT_ARRAY;
}

From source file:de.iteratec.iteraplan.presentation.dialog.common.model.businessmapping.NewBusinessMappingComponentModelPart.java

/**
 * Moves selected products from the available list to the connected list. Selected products are
 * identified by the ID array that the browser sent. That array is cleared after products were moved.
 *//*from ww  w  .j  ava 2 s .c om*/
private void addPrs() {
    for (Integer id : this.prToAdd) {
        Product pr = this.availableProducts.getWithKey(id);
        availableProducts.removeWithKey(pr.getId());
        connectedProducts.addWithKey(pr, pr.getId());
    }

    prToAdd = ArrayUtils.EMPTY_INTEGER_OBJECT_ARRAY;
}

From source file:org.marketcetera.util.misc.IterableUtilsTest.java

@Test
public void basics() {
    LinkedList<Integer> list = new LinkedList<Integer>();
    assertEquals(0, IterableUtils.size(list));
    assertArrayEquals(ArrayUtils.EMPTY_INTEGER_OBJECT_ARRAY, IterableUtils.toArray(list));

    list.add(1);//from  w  w w .  j  a  v  a 2 s  .  c o m
    list.add(2);
    assertEquals(2, IterableUtils.size(list));
    assertArrayEquals(new Integer[] { 1, 2 }, IterableUtils.toArray(list));
}