org.openbandy.util
Class CollectionsUtil

java.lang.Object
  extended by org.openbandy.util.CollectionsUtil

public class CollectionsUtil
extends java.lang.Object

The CollectionsUtil class provides some helper methods for the java.util.Vector class.

(c) Copyright P. Bolliger 2007, ALL RIGHTS RESERVED.

Version:
1.5
Author:
Philipp Bolliger (philipp@bolliger.name)

Constructor Summary
CollectionsUtil()
           
 
Method Summary
static void copy(java.util.Vector in, java.util.Vector out)
          Copies the content of Vector in to the Vector out.
static java.util.Vector reverseOrder(java.util.Vector in)
          Reverses the order of the elements in the vector.
static boolean vectorContainsString(java.util.Vector vector, java.lang.String lookupString)
          This method can be used to check the vector for existence of a certain String.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CollectionsUtil

public CollectionsUtil()
Method Detail

reverseOrder

public static java.util.Vector reverseOrder(java.util.Vector in)
Reverses the order of the elements in the vector.

Parameters:
in - Vector to reverse.
Returns:
The resulting vector.

vectorContainsString

public static boolean vectorContainsString(java.util.Vector vector,
                                           java.lang.String lookupString)
This method can be used to check the vector for existence of a certain String.

Parameters:
vector - The vector to sift through.
lookupString - The String to look after.
Returns:
True if the vector contains the string.

copy

public static void copy(java.util.Vector in,
                        java.util.Vector out)
Copies the content of Vector in to the Vector out.

Parameters:
in - The vector to copy from
out - The vector to copy to