Free cookie consent management tool by TermsFeed Policy Generator

source: branches/OKBJavaConnector/main/java/com/heuristiclab/okb/wsclient/Utilities.java @ 5670

Last change on this file since 5670 was 5670, checked in by bfarka, 13 years ago

adding old connector project #1441

File size: 1.1 KB
Line 
1package at.hl.okb.wsclient;
2
3import at.hl.wsclient.okb.NamedOKBItem;
4import at.hl.wsclient.okb.Problem;
5
6import com.google.common.base.Predicate;
7
8class Utilities {
9 
10  private static class NameFilter implements Predicate<NamedOKBItem>
11  {
12    private final String name;
13   
14    public NameFilter(String name)
15    {
16      this.name = name;
17    }
18   
19    @Override
20    public boolean apply(NamedOKBItem arg0) {
21      return arg0.getName().getValue().equals(name);   
22    }
23  }
24 
25 
26  private static class ProblemFilter implements Predicate<Problem>
27  {
28      private final String problemName;
29      private final String problemClass;
30     
31      public ProblemFilter(String problemName, String problemClass)
32      {
33    this.problemClass = problemClass;
34    this.problemName = problemName;
35      }
36
37      @Override
38      public boolean apply(Problem input) {
39    // TODO Auto-generated method stub
40    return false;
41      }
42  }
43 
44 
45  public static Predicate<NamedOKBItem> createNameFilter(String name)
46  {
47    return new NameFilter(name);
48  }
49 
50  private Utilities()
51  {
52   
53  }
54 
55 
56}
Note: See TracBrowser for help on using the repository browser.