net.sourceforge.hiveutils.collections
Class SetOperations

java.lang.Object
  extended by net.sourceforge.hiveutils.collections.SetOperations

public class SetOperations
extends java.lang.Object

Helper class that performs some operations on "sets".

Author:
Jean-Francois Poilpret

Constructor Summary
protected SetOperations()
           
 
Method Summary
static boolean intersects(java.lang.String[] list1, java.lang.String[] list2)
          Checks if two lists have common items.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SetOperations

protected SetOperations()
Method Detail

intersects

public static boolean intersects(java.lang.String[] list1,
                                 java.lang.String[] list2)
Checks if two lists have common items.

Parameters:
list1 - first list of items. This list must be sorted.
list2 - second list of items. This list must be sorted.
Returns:
true if list1 and list2 have at least one item in common