public class IndexWordSet
extends java.lang.Object
IndexWords, each containing
one part of speech of the same word. IndexWordSets are usually created by a
call to Dictionary.lookupAllIndexWords.| Constructor and Description |
|---|
IndexWordSet(java.lang.String lemma) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(IndexWord word)
Adds an IndexWord to this set.
|
boolean |
equals(java.lang.Object object)
It is assumed that IndexWordSets will only be created by calling
Dictionary.lookupAllIndexWords,
so all IndexWordSets with the same lemma should be equal. |
IndexWord |
getIndexWord(POS p)
Returns the IndexWord associated with POS p.
|
IndexWord[] |
getIndexWordArray()
Returns an array of the IndexWords in this set.
|
java.util.Collection<IndexWord> |
getIndexWordCollection()
Returns a collection of the IndexWords in this set.
|
java.lang.String |
getLemma() |
int |
getSenseCount(POS pos)
Finds out how many senses the word with part-of-speech pos has.
|
java.util.Set<POS> |
getValidPOSSet()
Returns a set of all the parts-of-speech for which there is an
IndexWord in this set.
|
int |
hashCode() |
boolean |
isValidPOS(POS pos)
Return true if there is a word with part-of-speech pos in
this set.
|
void |
remove(POS p)
Removes the IndexWords associated with POS p from this set.
|
int |
size()
Returns the number of IndexWords in this set.
|
java.lang.String |
toString() |
public void add(IndexWord word)
word - word to addpublic void remove(POS p)
p - POSpublic int size()
public IndexWord getIndexWord(POS p)
p - POSpublic IndexWord[] getIndexWordArray()
public java.util.Collection<IndexWord> getIndexWordCollection()
public java.util.Set<POS> getValidPOSSet()
public boolean isValidPOS(POS pos)
pos - POSpublic int getSenseCount(POS pos)
pos - POSpublic java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String getLemma()
public boolean equals(java.lang.Object object)
Dictionary.lookupAllIndexWords,
so all IndexWordSets with the same lemma should be equal.equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Object