public class DeprecatedUCDWordList extends UCDWordList
This class is an extension of UCDWordList
. The only difference
lies in the fact that to be added in this list a word MUST be deprecated,
valid and recognised.
Note: Words of this list may not have a UCD syntax code or a description.
UCDWordList.UCDWordComparator
Modifier and Type | Field and Description |
---|---|
protected UCDWordList |
nonDeprecatedWords
List of non deprecated words which complements this UCD words listed
in this class.
|
LOGGER, words
Constructor and Description |
---|
DeprecatedUCDWordList(UCDWordList nonDeprecatedWords)
Create a list of all deprecated list compared to the given list of
"active" UCD words.
|
DeprecatedUCDWordList(UCDWordList nonDeprecatedWords,
java.lang.String version)
Create a list of all deprecated list compared to the given list of
"active" UCD words.
|
Modifier and Type | Method and Description |
---|---|
boolean |
add(UCDWord newWord)
Add the given deprecated UCD word.
|
int |
addAll(java.io.Reader reader,
boolean recommended)
Add all deprecated UCD words declared inside the specified reader.
|
boolean |
isForSameVersion()
Tell whether this list is at a same
version
than its associated list of non-deprecated words. |
addAll, addAll, addAll, addAll, addAll, clear, contains, get, get, getClosest, getVersion, iterator, lev_min, levenshtein, main, remove, search, size, startingWith
protected final UCDWordList nonDeprecatedWords
public DeprecatedUCDWordList(UCDWordList nonDeprecatedWords) throws java.lang.NullPointerException
nonDeprecatedWords
- List of all "active" UCD words.java.lang.NullPointerException
- If no list of "active" UCD words is
provided.public DeprecatedUCDWordList(UCDWordList nonDeprecatedWords, java.lang.String version) throws java.lang.NullPointerException
nonDeprecatedWords
- List of all "active" UCD words.version
- Version of the deprecated UCD words list, if
it should be different from the version of
the given list of non deprecated words.java.lang.NullPointerException
- If no list of "active" UCD words is
provided.public boolean add(UCDWord newWord)
add
in class UCDWordList
newWord
- The deprecated UCD word to add.true
if the given deprecated UCD word has been
successfully added,
false
if the given word
is null
,
is not valid,
is recognised,
is not deprecated,
already exists in the list
or words of the suggested UCD extract
are not all recognised.public int addAll(java.io.Reader reader, boolean recommended) throws java.lang.NullPointerException, java.io.IOException
The real parsing is performed by
UCDParser.parseDeprecatedWordList(Reader, UCDWordList, DeprecatedUCDWordList)
.
Please take a look to its Javadoc for more details about the expected
syntax and the possible errors that can occur.
addAll
in class UCDWordList
reader
- Reader whose the content must be parsed.recommended
- IGNORED in this implementationjava.lang.NullPointerException
- If the given reader is null
.java.io.IOException
- If an error occurred while reading the
specified input.UCDParser.parseDeprecatedWordList(Reader, UCDWordList, DeprecatedUCDWordList)
public final boolean isForSameVersion()
version
than its associated list of non-deprecated words.true
if the same version than the active words,
false
otherwise.