(String s)
| 27 | } |
| 28 | |
| 29 | public ArrayList<Integer> search(String s) { |
| 30 | if (s == null || s.length() == 0) { |
| 31 | return indexes; |
| 32 | } else { |
| 33 | char first = s.charAt(0); |
| 34 | if (children.containsKey(first)) { |
| 35 | String remainder = s.substring(1); |
| 36 | return children.get(first).search(remainder); |
| 37 | } |
| 38 | } |
| 39 | return null; |
| 40 | } |
| 41 | } |
| 42 |