cds.util
Class ArrayLists

java.lang.Object
  extended bycds.util.ArrayLists

public class ArrayLists
extends java.lang.Object

Utility class containing static methods associated with ArrayLists

Version:
1.0 Dec 2003
Author:
Marc Wenger/CDS

Constructor Summary
ArrayLists()
           
 
Method Summary
static java.util.ArrayList comm(java.util.ArrayList flist1, java.util.ArrayList flist2, java.util.Comparator fcomp)
          Compares two sorted lists and split them into three sublists containing
1) the entries only in the first list
2) the entries only in the second list
3) the entries common to both lists
static void main(java.lang.String[] args)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ArrayLists

public ArrayLists()
Method Detail

comm

public static java.util.ArrayList comm(java.util.ArrayList flist1,
                                       java.util.ArrayList flist2,
                                       java.util.Comparator fcomp)
Compares two sorted lists and split them into three sublists containing
1) the entries only in the first list
2) the entries only in the second list
3) the entries common to both lists

Parameters:
flist1 - first list (must be already sorted)
flist2 - second list (must be already sorted)
fcomp - Comparator object. This object must be compatible with those used to sort the two lists, i.e. it must sort in the same order.
Returns:
an array of 3 lists. the first one contains the entries of entries only in flist1, the second only in flist2 and the third the entries common to both lists

main

public static void main(java.lang.String[] args)