author | Jaroslav Tulach <jtulach@netbeans.org> |
Sat, 14 Jun 2008 09:53:37 +0200 | |
changeset 77 | 22c1953e372c |
child 78 | af48bccb02cb |
permissions | -rw-r--r-- |
jtulach@77 | 1 |
/* |
jtulach@77 | 2 |
* To change this template, choose Tools | Templates |
jtulach@77 | 3 |
* and open the template in the editor. |
jtulach@77 | 4 |
*/ |
jtulach@77 | 5 |
|
jtulach@77 | 6 |
package api.classes; |
jtulach@77 | 7 |
|
jtulach@77 | 8 |
import java.util.Iterator; |
jtulach@77 | 9 |
import java.util.List; |
jtulach@77 | 10 |
|
jtulach@77 | 11 |
/** |
jtulach@77 | 12 |
* |
jtulach@77 | 13 |
* @author Jaroslav Tulach <jaroslav.tulach@netbeans.org> |
jtulach@77 | 14 |
*/ |
jtulach@77 | 15 |
public class Support { |
jtulach@77 | 16 |
private Support() { |
jtulach@77 | 17 |
} |
jtulach@77 | 18 |
|
jtulach@77 | 19 |
public static int searchByName(String name, Compute provider) { |
jtulach@77 | 20 |
Iterator<String> it = provider.getData().iterator(); |
jtulach@77 | 21 |
for (int i = 0; it.hasNext(); i++) { |
jtulach@77 | 22 |
if (name.equals(it.next())) { |
jtulach@77 | 23 |
return i; |
jtulach@77 | 24 |
} |
jtulach@77 | 25 |
} |
jtulach@77 | 26 |
return -1; |
jtulach@77 | 27 |
} |
jtulach@77 | 28 |
|
jtulach@77 | 29 |
} |