(LocalizedSubstring substring)
| 17 | } |
| 18 | |
| 19 | public void addSubstring(LocalizedSubstring substring) |
| 20 | { |
| 21 | int language = substring.getLanguage(); |
| 22 | int gender = substring.getGender(); |
| 23 | ListIterator li = this.substringList.listIterator(); |
| 24 | boolean found = false; |
| 25 | while (li.hasNext()) { |
| 26 | LocalizedSubstring oldSubstring = (LocalizedSubstring)li.next(); |
| 27 | if ((oldSubstring.getLanguage() == language) && (oldSubstring.getGender() == gender)) { |
| 28 | li.set(substring); |
| 29 | found = true; |
| 30 | break; |
| 31 | } |
| 32 | } |
| 33 | |
| 34 | if (!found) |
| 35 | this.substringList.add(substring); |
| 36 | } |
| 37 | |
| 38 | public int getStringReference() |
| 39 | { |
no test coverage detected