|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eml.sir.rel.FrequencyList
List containing Strings and their frequency.
Field Summary | |
static char |
ORDER_ALPHABETICAL
|
static char |
ORDER_BY_FREQUENCY
|
Constructor Summary | |
FrequencyList()
Create a new instance of FrequencyList. |
Method Summary | |
void |
add(java.lang.String graphs)
Add a String to this FrequencyList. |
void |
addSome(java.lang.String graphs,
int number)
Add the multiple occurrence of a String to this FrequencyList. |
java.util.ArrayList |
getAlphabeticalList()
Return the Strings that have been added to this FrequencyList ordered alpabetically. |
int |
getFrequency(java.lang.String graphs)
Return the frequency of the specified String. |
java.util.ArrayList |
getFrequencyList()
Return the Strings that have been added to this FrequencyList ordered by their frequency. |
java.util.HashMap |
getMap()
Return an HashMap with Strings as keys and their frequency as the values. |
char |
getPartOfSpeech()
Return part of speech of this FrequencyList. |
int |
getSumOverAll()
Return the number of all Strings that have been added. |
static FrequencyList |
load(java.lang.String fileName)
Load a serialized instance of FrequencyList. |
boolean |
save(java.lang.String fileName)
Serialize an instance of FrequencyList and save it to a file. |
void |
setPartOfSpeech(char pos)
Set part of speech of this FrequencyList. |
int |
size()
Return the number of different Strings that have been counted. |
java.lang.String[] |
toStrings(char what)
Return a String array that contains the Strings of this FrequencyList and their frequency ordered by frequency or alphabetically. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final char ORDER_ALPHABETICAL
public static final char ORDER_BY_FREQUENCY
Constructor Detail |
public FrequencyList()
Method Detail |
public char getPartOfSpeech()
public void setPartOfSpeech(char pos)
public void add(java.lang.String graphs)
public void addSome(java.lang.String graphs, int number)
number
- Number of the String to be counted.public int size()
public int getSumOverAll()
public java.util.HashMap getMap()
public java.util.ArrayList getAlphabeticalList()
public java.util.ArrayList getFrequencyList()
public int getFrequency(java.lang.String graphs)
public java.lang.String[] toStrings(char what)
what
- The order. Use the field constants ORDER_ALPHABETICAL
or ORDER_BY_FREQUENCY.public static FrequencyList load(java.lang.String fileName)
fileName
- Complete path and file name.public boolean save(java.lang.String fileName)
fileName
- Complete path and file name.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |