FileDocCategorySizeDatePackage
ArraySupport.javaAPI DocExample942Thu Jun 28 16:14:16 BST 2001com.ora.jsp.util

ArraySupport

public class ArraySupport extends Object
This class contains static methods for working with arrays.
author
Hans Bergsten, Gefion software
version
1.0

Fields Summary
Constructors Summary
Methods Summary
public static booleancontains(java.lang.String[] array, java.lang.String value)
Returns true if the specified value matches one of the elements in the specified array.

param
array the array to test.
param
value the value to look for.
return
true if valid, false otherwise

        boolean isIncluded = false;

        if (array == null || value == null) {
            return false;
        }
        for (int i = 0; i < array.length; i++) {
            if (value.equals(array[i])) {
                isIncluded = true;
                break;
            }
        }
        return isIncluded;