Package net.sf.okapi.steps.tokenization
Class TokenConfigs
- java.lang.Object
-
- net.sf.okapi.common.BaseParameters
-
- net.sf.okapi.common.StringParameters
-
- net.sf.okapi.common.AbstractGroupParameters
-
- net.sf.okapi.steps.tokenization.TokenConfigs
-
- All Implemented Interfaces:
Cloneable,Iterable<TokenConfigs.TokenConfig>,Collection<TokenConfigs.TokenConfig>,List<TokenConfigs.TokenConfig>,IParameters,ISimplifierRulesParameters
public class TokenConfigs extends AbstractGroupParameters implements List<TokenConfigs.TokenConfig>
TokenType Definitions
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classTokenConfigs.TokenConfig
-
Field Summary
-
Fields inherited from class net.sf.okapi.common.StringParameters
buffer
-
Fields inherited from class net.sf.okapi.common.BaseParameters
path
-
Fields inherited from interface net.sf.okapi.common.ISimplifierRulesParameters
SIMPLIFIERRULES, SIMPLIFIERRULES_DISPLAY_NAME, SIMPLIFIERRULES_SHORT_DESC
-
-
Constructor Summary
Constructors Constructor Description TokenConfigs()
-
Method Summary
-
Methods inherited from class net.sf.okapi.common.AbstractGroupParameters
fromString, getData, getSimplifierRules, loadFromResource, loadGroup, loadGroup, saveGroup, saveGroup, saveToResource, setSimplifierRules, toString, validateSimplifierRules
-
Methods inherited from class net.sf.okapi.common.StringParameters
fromString, getBoolean, getGroup, getInteger, getString, setBoolean, setGroup, setInteger, setString
-
Methods inherited from class net.sf.okapi.common.BaseParameters
getParametersDescription, getPath, load, load, save, setPath
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
-
Methods inherited from interface net.sf.okapi.common.IParameters
copy
-
Methods inherited from interface java.util.List
equals, hashCode, replaceAll, sort, spliterator
-
-
-
-
Method Detail
-
reset
public void reset()
Description copied from class:StringParametersReset this parameters object to its default values.Subclasses should override this method to set any initial values and instantiate any objects that require allocation. It is recommended that subclasses also call
super.reset()in the override to ensure that the buffer is empty.- Specified by:
resetin interfaceIParameters- Overrides:
resetin classStringParameters
-
load
public void load(ParametersString buffer)
Description copied from class:AbstractGroupParametersLoad from buffer. The protected buffer variable is visible in all subclasses of BaseParameters.- Specified by:
loadin classAbstractGroupParameters
-
save
public void save(ParametersString buffer)
Description copied from class:AbstractGroupParametersSave to buffer. The protected buffer variable is visible in all subclasses of BaseParameters.- Specified by:
savein classAbstractGroupParameters
-
getRule
public TokenConfigs.TokenConfig getRule(int tokenId)
Gets a rule by its tokenId- Parameters:
tokenId- ID of the rule.- Returns:
- TokenConfig object of null if no rule has been assigned to the given lexem ID.
-
add
public boolean add(TokenConfigs.TokenConfig o)
- Specified by:
addin interfaceCollection<TokenConfigs.TokenConfig>- Specified by:
addin interfaceList<TokenConfigs.TokenConfig>
-
add
public void add(int index, TokenConfigs.TokenConfig element)- Specified by:
addin interfaceList<TokenConfigs.TokenConfig>
-
addAll
public boolean addAll(Collection<? extends TokenConfigs.TokenConfig> c)
- Specified by:
addAllin interfaceCollection<TokenConfigs.TokenConfig>- Specified by:
addAllin interfaceList<TokenConfigs.TokenConfig>
-
addAll
public boolean addAll(int index, Collection<? extends TokenConfigs.TokenConfig> c)- Specified by:
addAllin interfaceList<TokenConfigs.TokenConfig>
-
clear
public void clear()
- Specified by:
clearin interfaceCollection<TokenConfigs.TokenConfig>- Specified by:
clearin interfaceList<TokenConfigs.TokenConfig>
-
contains
public boolean contains(Object o)
- Specified by:
containsin interfaceCollection<TokenConfigs.TokenConfig>- Specified by:
containsin interfaceList<TokenConfigs.TokenConfig>
-
containsAll
public boolean containsAll(Collection<?> c)
- Specified by:
containsAllin interfaceCollection<TokenConfigs.TokenConfig>- Specified by:
containsAllin interfaceList<TokenConfigs.TokenConfig>
-
get
public TokenConfigs.TokenConfig get(int index)
- Specified by:
getin interfaceList<TokenConfigs.TokenConfig>
-
indexOf
public int indexOf(Object o)
- Specified by:
indexOfin interfaceList<TokenConfigs.TokenConfig>
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmptyin interfaceCollection<TokenConfigs.TokenConfig>- Specified by:
isEmptyin interfaceList<TokenConfigs.TokenConfig>
-
iterator
public Iterator<TokenConfigs.TokenConfig> iterator()
- Specified by:
iteratorin interfaceCollection<TokenConfigs.TokenConfig>- Specified by:
iteratorin interfaceIterable<TokenConfigs.TokenConfig>- Specified by:
iteratorin interfaceList<TokenConfigs.TokenConfig>
-
lastIndexOf
public int lastIndexOf(Object o)
- Specified by:
lastIndexOfin interfaceList<TokenConfigs.TokenConfig>
-
listIterator
public ListIterator<TokenConfigs.TokenConfig> listIterator()
- Specified by:
listIteratorin interfaceList<TokenConfigs.TokenConfig>
-
listIterator
public ListIterator<TokenConfigs.TokenConfig> listIterator(int index)
- Specified by:
listIteratorin interfaceList<TokenConfigs.TokenConfig>
-
remove
public boolean remove(Object o)
- Specified by:
removein interfaceCollection<TokenConfigs.TokenConfig>- Specified by:
removein interfaceList<TokenConfigs.TokenConfig>
-
remove
public TokenConfigs.TokenConfig remove(int index)
- Specified by:
removein interfaceList<TokenConfigs.TokenConfig>
-
removeAll
public boolean removeAll(Collection<?> c)
- Specified by:
removeAllin interfaceCollection<TokenConfigs.TokenConfig>- Specified by:
removeAllin interfaceList<TokenConfigs.TokenConfig>
-
retainAll
public boolean retainAll(Collection<?> c)
- Specified by:
retainAllin interfaceCollection<TokenConfigs.TokenConfig>- Specified by:
retainAllin interfaceList<TokenConfigs.TokenConfig>
-
set
public TokenConfigs.TokenConfig set(int index, TokenConfigs.TokenConfig element)
- Specified by:
setin interfaceList<TokenConfigs.TokenConfig>
-
size
public int size()
- Specified by:
sizein interfaceCollection<TokenConfigs.TokenConfig>- Specified by:
sizein interfaceList<TokenConfigs.TokenConfig>
-
subList
public List<TokenConfigs.TokenConfig> subList(int fromIndex, int toIndex)
- Specified by:
subListin interfaceList<TokenConfigs.TokenConfig>
-
toArray
public Object[] toArray()
- Specified by:
toArrayin interfaceCollection<TokenConfigs.TokenConfig>- Specified by:
toArrayin interfaceList<TokenConfigs.TokenConfig>
-
toArray
public <T> T[] toArray(T[] a)
- Specified by:
toArrayin interfaceCollection<TokenConfigs.TokenConfig>- Specified by:
toArrayin interfaceList<TokenConfigs.TokenConfig>
-
-