Class BulkDataUtility


  • public class BulkDataUtility
    extends java.lang.Object
    A utility class to support reordering operations of arrays.
    Author:
    Thomas Morgner
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void pushDown​(java.lang.Object[] data, boolean[] selection)
      Pushes the selected elements down.
      static void pushDownSingleValue​(java.lang.Object[] data, java.lang.Object selection)
      Pushes the selected element down.
      static void pushUp​(java.lang.Object[] data, boolean[] selection)
      Pushes the selected elements up.
      static void pushUpSingleValue​(java.lang.Object[] data, java.lang.Object selection)
      Pushes up the selected element.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • pushUp

        public static void pushUp​(java.lang.Object[] data,
                                  boolean[] selection)
        Pushes the selected elements up. The elements are given in the data-array, while a selector on whether they should be pushed up is given in the selection array. The operation modifies the data-array.
        Parameters:
        data - the array holding the data-objects.
        selection - the selection of which elements should be pushed up.
      • pushDown

        public static void pushDown​(java.lang.Object[] data,
                                    boolean[] selection)
        Pushes the selected elements down. The elements are given in the data-array, while a selector on whether they should be pushed down is given in the selection array. The operation modifies the data-array.
        Parameters:
        data - the array holding the data-objects.
        selection - the selection of which elements should be pushed down.
      • pushUpSingleValue

        public static void pushUpSingleValue​(java.lang.Object[] data,
                                             java.lang.Object selection)
        Pushes up the selected element. The element is compared via reference-equality, so equals() will not be called. It is assumed that the selected object is part of the data-collection. The operation modifies the data-array.
        Parameters:
        data - the array holding the data-objects.
        selection - the selectioned object that be pushed up.
      • pushDownSingleValue

        public static void pushDownSingleValue​(java.lang.Object[] data,
                                               java.lang.Object selection)
        Pushes the selected element down. The element is compared via reference-equality, so equals() will not be called. It is assumed that the selected object is part of the data-collection. The operation modifies the data-array.
        Parameters:
        data - the array holding the data-objects.
        selection - the selectioned object that be pushed down.