author | Jaroslav Tulach <jtulach@netbeans.org> |
Sat, 14 Jun 2008 09:53:38 +0200 | |
changeset 78 | af48bccb02cb |
parent 77 | 22c1953e372c |
permissions | -rw-r--r-- |
jtulach@77 | 1 |
package api.classes; |
jtulach@77 | 2 |
|
jtulach@77 | 3 |
import java.util.Iterator; |
jtulach@77 | 4 |
import java.util.List; |
jtulach@77 | 5 |
|
jtulach@77 | 6 |
public class Support { |
jtulach@77 | 7 |
private Support() { |
jtulach@77 | 8 |
} |
jtulach@77 | 9 |
|
jtulach@77 | 10 |
public static int searchByName(String name, Compute provider) { |
jtulach@77 | 11 |
Iterator<String> it = provider.getData().iterator(); |
jtulach@77 | 12 |
for (int i = 0; it.hasNext(); i++) { |
jtulach@77 | 13 |
if (name.equals(it.next())) { |
jtulach@77 | 14 |
return i; |
jtulach@77 | 15 |
} |
jtulach@77 | 16 |
} |
jtulach@77 | 17 |
return -1; |
jtulach@77 | 18 |
} |
jtulach@77 | 19 |
|
jtulach@77 | 20 |
} |