Last change
on this file since 8775 was 8775, checked in by schweer, 19 years ago |
some todo and licensing comments
|
-
Property svn:keywords
set to
Author Date Id Revision
|
File size:
775 bytes
|
Line | |
---|
1 | /*
|
---|
2 | * Created on Dec 5, 2004
|
---|
3 | * Copyright (C) Andrea Schweer, 2004
|
---|
4 | *
|
---|
5 | * This file is part of the Greenstone Alerting Service.
|
---|
6 | * Refer to the COPYING file in the base directory of this package
|
---|
7 | * for licensing information.
|
---|
8 | */
|
---|
9 | package org.greenstone.gsdlas.util;
|
---|
10 |
|
---|
11 | import java.util.Arrays;
|
---|
12 |
|
---|
13 | /**
|
---|
14 | * @author andrea
|
---|
15 | *
|
---|
16 | * TODO To change the template for this generated type comment go to
|
---|
17 | * Window - Preferences - Java - Code Style - Code Templates
|
---|
18 | */
|
---|
19 | public class ArrayHelper {
|
---|
20 | static public boolean contains(String[] array, String element) {
|
---|
21 | if (array == null || element == null) {
|
---|
22 | return false;
|
---|
23 | }
|
---|
24 | Arrays.sort(array);
|
---|
25 | int index = Arrays.binarySearch(array, element);
|
---|
26 | return index > -1 && index <= array.length;
|
---|
27 | }
|
---|
28 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.