source: trunk/src_apollo/org/apollo/util/TextItemSearchResult.java@ 315

Last change on this file since 315 was 315, checked in by bjn8, 16 years ago

Apollo spin-off added

File size: 835 bytes
Line 
1package org.apollo.util;
2
3import java.util.List;
4/**
5 * Represents a single mutable search result.
6 *
7 * @author Brook Novak
8 */
9public class TextItemSearchResult {
10 /** The textual content of the text item. */
11 public String text;
12
13 /** The link of the item. Null if no link: note: this could be a number ... in expeditees format without F tag. */
14 public String explink;
15
16 /** Any data that is with the text item. */
17 public List<String> data;
18
19
20 public boolean containsData(String str) {
21 assert(str != null);
22 if (data != null)
23 return data.contains(str);
24 return false;
25 }
26
27 public boolean containsDataTrimmedIgnoreCase(String str) {
28 assert(str != null);
29 if (data != null) {
30 for (String d : data) {
31 if (d != null && d.trim().equalsIgnoreCase(str)) {
32 return true;
33 }
34 }
35 }
36
37 return false;
38 }
39}
Note: See TracBrowser for help on using the repository browser.