Last change
on this file since 8738 was 8738, checked in by schweer, 19 years ago |
user authentication works; user information and subscriptions/predicates are stored to thedatabase
|
-
Property svn:keywords
set to
Author Date Id Revision
|
File size:
705 bytes
|
Line | |
---|
1 | /*
|
---|
2 | * Created on Dec 5, 2004
|
---|
3 | *
|
---|
4 | * TODO To change the template for this generated file go to
|
---|
5 | * Window - Preferences - Java - Code Style - Code Templates
|
---|
6 | */
|
---|
7 | package org.greenstone.gsdlas.util;
|
---|
8 |
|
---|
9 | import java.util.Arrays;
|
---|
10 |
|
---|
11 | /**
|
---|
12 | * @author andrea
|
---|
13 | *
|
---|
14 | * TODO To change the template for this generated type comment go to
|
---|
15 | * Window - Preferences - Java - Code Style - Code Templates
|
---|
16 | */
|
---|
17 | public class ArrayHelper {
|
---|
18 | static public boolean contains(String[] array, String element) {
|
---|
19 | if (array == null || element == null) {
|
---|
20 | return false;
|
---|
21 | }
|
---|
22 | Arrays.sort(array);
|
---|
23 | int index = Arrays.binarySearch(array, element);
|
---|
24 | return index > -1 && index <= array.length;
|
---|
25 | }
|
---|
26 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.