public class DummyNamesTranslator extends AbstractNamesTranslator implements NamesTranslator
AbstractNamesTranslator.SimpleList, AbstractNamesTranslator.SimpleMap
Modifier and Type | Field and Description |
---|---|
protected AbstractNamesTranslator.SimpleList |
translatedNames |
sourceNames
Modifier | Constructor and Description |
---|---|
protected |
DummyNamesTranslator() |
Modifier and Type | Method and Description |
---|---|
int |
addSource(java.lang.String sourceName) |
protected void |
build() |
void |
clear() |
java.util.List<java.lang.String> |
getAllTranslations(java.lang.String sourceName) |
java.lang.String |
getSource(java.lang.String name)
Returns the source name corresponding to the translation indicated
in the "translationName" parameter.
|
java.util.List<java.lang.String> |
getSourceNames()
Return the list of source names.
|
java.lang.String |
getSuggestion(java.lang.String name)
Check if the name passed as a parameter collides with
any existing translation.
|
java.util.List<java.lang.String> |
getTranslatedNames()
Return the list of translated names.
|
java.lang.String |
getTranslation(int index)
Returns the translation corresponding to the source name indicated
in the "index" parameter.
|
java.lang.String |
getTranslation(java.lang.String sourceName)
Returns the translation corresponding to the source name indicated
in the "sourceName" parameter.
|
boolean |
hasDuplicateSources() |
void |
rebuild() |
int |
setTranslation(int n,
java.lang.String translatedName) |
int |
setTranslation(java.lang.String sourceName,
java.lang.String translatedName)
Assign the translation "translationName" to the name "sourceName".
|
void |
updateSourceNames(java.lang.Iterable<java.lang.String> names) |
void |
updateSourceNames(java.lang.Iterable objs,
java.util.function.Function<java.lang.Object,java.lang.String> name_getter) |
void |
updateSourceNames(java.lang.String[] names) |
clone, getSource, getTranslatedNamesAsArray, isValid, loadFromState, registerPersistence, saveToState, setSourceNames, setSourceNames, setSourceNames
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
clone, createBaseTranslator, createDummyTranslator, createTrimTranslator, getSource, getTranslatedNamesAsArray, isValid, setSourceNames, setSourceNames, setSourceNames
cloneQuietly, cloneQuietly
protected AbstractNamesTranslator.SimpleList translatedNames
protected void build()
build
in class AbstractNamesTranslator
public java.util.List<java.lang.String> getSourceNames()
NamesTranslator
getSourceNames
in interface NamesTranslator
getSourceNames
in class AbstractNamesTranslator
public java.util.List<java.lang.String> getTranslatedNames()
NamesTranslator
getTranslatedNames
in interface NamesTranslator
public java.lang.String getTranslation(java.lang.String sourceName)
NamesTranslator
getTranslation
in interface NamesTranslator
public java.lang.String getSource(java.lang.String name)
NamesTranslator
getSource
in interface NamesTranslator
public java.lang.String getSuggestion(java.lang.String name)
NamesTranslator
getSuggestion
in interface NamesTranslator
public java.lang.String getTranslation(int index)
NamesTranslator
getTranslation
in interface NamesTranslator
public int setTranslation(java.lang.String sourceName, java.lang.String translatedName)
NamesTranslator
setTranslation
in interface NamesTranslator
public void rebuild()
rebuild
in interface NamesTranslator
public int addSource(java.lang.String sourceName)
addSource
in interface NamesTranslator
public void updateSourceNames(java.lang.String[] names)
updateSourceNames
in interface NamesTranslator
public void updateSourceNames(java.lang.Iterable<java.lang.String> names)
updateSourceNames
in interface NamesTranslator
public void updateSourceNames(java.lang.Iterable objs, java.util.function.Function<java.lang.Object,java.lang.String> name_getter)
updateSourceNames
in interface NamesTranslator
public java.util.List<java.lang.String> getAllTranslations(java.lang.String sourceName)
getAllTranslations
in interface NamesTranslator
public void clear()
clear
in interface NamesTranslator
public boolean hasDuplicateSources()
hasDuplicateSources
in interface NamesTranslator
public int setTranslation(int n, java.lang.String translatedName)
setTranslation
in interface NamesTranslator