ariba.util.core
Class IntCompanionSort

java.lang.Object
  extended by ariba.util.core.Sort
      extended by ariba.util.core.IntCompanionSort

public class IntCompanionSort
extends Sort

provides functions for sorting arrays of objects, with integer companion arrays


Field Summary
 
Fields inherited from class ariba.util.core.Sort
SortAscending, SortDescending, SortNone
 
Method Summary
static void objects(java.lang.Object[] a, int[] c1, Compare c)
          Sort two arrays in ascending order, using one array for the keys.
static void objects(java.lang.Object[] a, int[] c1, Compare c, int dir)
          Sort two arrays in a specified order, using one array for the keys.
static void objects(java.lang.Object[] a, int[] c1, int[] c2, Compare c)
          Sort three arrays in ascending order, using one array for the keys.
static void objects(java.lang.Object[] a, int[] c1, int[] c2, Compare c, int dir)
          Sort three arrays in a specified order, using one array for the keys.
static void objects(java.lang.Object[] a, int[] c1, int[] c2, int first, int n, Compare c)
          Sort a range of elements in three arrays in ascending order, using one array for the keys.
static void objects(java.lang.Object[] a, int[] c1, int[] c2, int first, int n, Compare c, int dir)
          Sort a range of elements in three arrays in a specified order, using one array for the keys.
 
Methods inherited from class ariba.util.core.Sort
getSwapDirection, objects, objects, objects, objects, objects, objects, objects, objects, reverseCompare
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

objects

public static void objects(java.lang.Object[] a,
                           int[] c1,
                           Compare c)
Sort two arrays in ascending order, using one array for the keys. One array has the keys used for the sort, and another companion int array is also sorted with the key array.

Parameters:
a - an array of objects to sort
c1 - a companion int array to sort in parallel with the array a. The values in c1 do not affect the sort.
c - an object to that implements the comparison interface

objects

public static void objects(java.lang.Object[] a,
                           int[] c1,
                           Compare c,
                           int dir)
Sort two arrays in a specified order, using one array for the keys. One array has the keys used for the sort, and another companion int array is also sorted with the key array.

Parameters:
a - an array of objects to sort
c1 - a companion int array to sort in parallel with the array a. The values in c1 do not affect the sort.
c - an object to that implements the comparison interface
dir - the direction to sort the objects in. Must be SortAscending or SortDescending
See Also:
Sort.SortAscending, Sort.SortDescending

objects

public static void objects(java.lang.Object[] a,
                           int[] c1,
                           int[] c2,
                           Compare c)
Sort three arrays in ascending order, using one array for the keys. One array has the keys used for the sort, and the other two companion int arrays are also sorted with the key array.

Parameters:
a - an array of objects to sort
c1 - a companion int array to sort in parallel with the array a. The values in c1 do not affect the sort.
c2 - a companion int array to sort in parallel with the array a. The values in c2 do not affect the sort.
c - an object to that implements the comparison interface

objects

public static void objects(java.lang.Object[] a,
                           int[] c1,
                           int[] c2,
                           Compare c,
                           int dir)
Sort three arrays in a specified order, using one array for the keys. One array has the keys used for the sort, and the other two companion int arrays are also sorted with the key array.

Parameters:
a - an array of objects to sort
c1 - a companion int array to sort in parallel with the array a. The values in c1 do not affect the sort.
c2 - a companion int array to sort in parallel with the array a. The values in c2 do not affect the sort.
c - an object to that implements the comparison interface
dir - the direction to sort the objects in. Must be SortAscending or SortDescending
See Also:
Sort.SortAscending, Sort.SortDescending

objects

public static void objects(java.lang.Object[] a,
                           int[] c1,
                           int[] c2,
                           int first,
                           int n,
                           Compare c)
Sort a range of elements in three arrays in ascending order, using one array for the keys. Sorts elements first through first + n - 1 of the object array a, using the Compare object c to compare elements. The companion int arrays c1 and c2 are also sorted in parallel with a.

Parameters:
a - an array of objects to sort
c1 - a companion int array to sort in parallel with the array a. The values in c1 do not affect the sort.
c2 - a companion int array to sort in parallel with the array a. The values in c2 do not affect the sort.
first - the first element to sort
n - the number of elements to sort
c - an object to that implements the comparison interface

objects

public static void objects(java.lang.Object[] a,
                           int[] c1,
                           int[] c2,
                           int first,
                           int n,
                           Compare c,
                           int dir)
Sort a range of elements in three arrays in a specified order, using one array for the keys. Sorts elements first through first + n - 1 of the object array a, using the Compare object c to compare elements. The companion int arrays c1 and c2 are also sorted in parallel with a.

Parameters:
a - an array of objects to sort
c1 - a companion int array to sort in parallel with the array a. The values in c1 do not affect the sort.
c2 - a companion int array to sort in parallel with the array a. The values in c2 do not affect the sort.
first - the first element to sort
n - the number of elements to sort
c - an object to that implements the comparison interface
dir - the direction to sort the objects in. Must be SortAscending or SortDescending
See Also:
Sort.SortAscending, Sort.SortDescending


AribaWeb User Interface Development Framework
Copyright © 2000-2014 Ariba, Inc. All Rights Reserved.