diff options
Diffstat (limited to 'src/main/java/bjc/inflexion/nouns/Prepositions.java')
| -rw-r--r-- | src/main/java/bjc/inflexion/nouns/Prepositions.java | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/src/main/java/bjc/inflexion/nouns/Prepositions.java b/src/main/java/bjc/inflexion/nouns/Prepositions.java index 9f8424e..0d36c7e 100644 --- a/src/main/java/bjc/inflexion/nouns/Prepositions.java +++ b/src/main/java/bjc/inflexion/nouns/Prepositions.java @@ -24,14 +24,12 @@ import java.util.Set; * List of prepositions. * * @author EVE - * */ public class Prepositions { + /* Our set of prepositions. */ private final Set<String> prepositions; - /** - * Create an empty preposition DB. - */ + /** Create an empty preposition DB. */ public Prepositions() { prepositions = new HashSet<>(); } @@ -40,9 +38,10 @@ public class Prepositions { * Check if a word is a preposition. * * @param word - * The word as a preposition. + * The word as a preposition. * - * @return Whether or not the word is a preposition. + * @return + * Whether or not the word is a preposition. */ public boolean isPreposition(final String word) { return prepositions.contains(word); @@ -52,16 +51,14 @@ public class Prepositions { * Load the contents of the stream into this DB. * * @param stream - * The stream to load from. + * The stream to load from. */ public void loadFromStream(final InputStream stream) { try (Scanner scn = new Scanner(stream)) { while (scn.hasNextLine()) { final String ln = scn.nextLine().trim(); - /* - * Ignore comments - */ + /* Ignore comments */ if (ln.startsWith("#")) { continue; } @@ -70,4 +67,4 @@ public class Prepositions { } } } -}
\ No newline at end of file +} |
