summaryrefslogtreecommitdiff
path: root/src/main/java/bjc/esodata/AbbrevMap2.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/bjc/esodata/AbbrevMap2.java')
-rw-r--r--src/main/java/bjc/esodata/AbbrevMap2.java28
1 files changed, 16 insertions, 12 deletions
diff --git a/src/main/java/bjc/esodata/AbbrevMap2.java b/src/main/java/bjc/esodata/AbbrevMap2.java
index db41471..f131aec 100644
--- a/src/main/java/bjc/esodata/AbbrevMap2.java
+++ b/src/main/java/bjc/esodata/AbbrevMap2.java
@@ -3,19 +3,22 @@ package bjc.esodata;
import java.util.*;
/**
- * A map that allows you to reference strings by unambiguous abbreviations to them.
- *
- * One example is that adding the string 'abc' would allow you to get it back with the following three keys
+ * A map that allows you to reference strings by unambiguous abbreviations to
+ * them.
+ *
+ * One example is that adding the string 'abc' would allow you to get it back
+ * with the following three keys
* <ul>
- * <li>a</li>
- * <li>ab</li>
- * <li>abc</li>
+ * <li>a</li>
+ * <li>ab</li>
+ * <li>abc</li>
* </ul>
*
* @author Ben Culkin
*/
public class AbbrevMap2 {
- // Stores a mapping from strings, to strings that they could be abbreviations for
+ // Stores a mapping from strings, to strings that they could be abbreviations
+ // for
private Multimap<String, String> backing;
/**
@@ -29,7 +32,7 @@ public class AbbrevMap2 {
* Add words to the map.
*
* @param words
- * The words to add to the map.
+ * The words to add to the map.
*/
public void add(String... words) {
for (String word : words) {
@@ -58,7 +61,7 @@ public class AbbrevMap2 {
* Remove words from the map.
*
* @param words
- * The words to remove from the map.
+ * The words to remove from the map.
*/
public void removeWords(String... words) {
for (String word : words) {
@@ -72,7 +75,7 @@ public class AbbrevMap2 {
* Get all of the strings that a string could be an abbreviation for.
*
* @param word
- * The word to attempt to deabbreviate.
+ * The word to attempt to deabbreviate.
*
* @return All of the possible deabbreviations for that word.
*/
@@ -84,9 +87,10 @@ public class AbbrevMap2 {
* Get the unambiguous thing the string is an abbreviation for.
*
* @param word
- * The word to attempt to deabbreviate.
+ * The word to attempt to deabbreviate.
*
- * @return The unambiguous deabbreviation of the string, or null if there isn't one.
+ * @return The unambiguous deabbreviation of the string, or null if there isn't
+ * one.
*/
public String deabbrev(String word) {
Set<String> st = backing.get(word);