public class UniqueNameMap extends java.lang.Object
Constructor and Description |
---|
UniqueNameMap(UniqueNameMapParameters parameters) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
addName(java.lang.String name)
Adds an original name as the key and its processed version as the values to the map.
|
void |
addNames(java.util.Collection<java.lang.String> names) |
void |
clear() |
boolean |
containsKey(java.lang.Object key) |
boolean |
containsValue(java.lang.Object value) |
java.util.Set<java.util.Map.Entry<java.lang.String,java.lang.String>> |
entrySet() |
protected java.util.Map<java.lang.String,java.lang.String> |
getMap() |
UniqueNameMapParameters |
getParameters() |
java.lang.String |
getProcessedName(java.lang.String originalName) |
boolean |
isEmpty() |
java.util.Set<java.lang.String> |
keySet() |
java.lang.String |
remove(java.lang.Object key) |
int |
size() |
java.util.Collection<java.lang.String> |
values() |
void |
writeNameMap(java.io.File file)
Writes the contents of the current name map in text format as tab separated values.
|
void |
writeNameMap(java.io.OutputStream stream)
Writes the contents of the current name map in text format as tab separated values.
|
public UniqueNameMap(UniqueNameMapParameters parameters)
public UniqueNameMapParameters getParameters()
protected java.util.Map<java.lang.String,java.lang.String> getMap()
public java.lang.String addName(java.lang.String name)
name
- the original name (stored as the key in the new map entry)public void addNames(java.util.Collection<java.lang.String> names)
public java.lang.String getProcessedName(java.lang.String originalName)
public void clear()
public boolean containsKey(java.lang.Object key)
public boolean containsValue(java.lang.Object value)
public java.util.Set<java.util.Map.Entry<java.lang.String,java.lang.String>> entrySet()
public boolean isEmpty()
public java.util.Set<java.lang.String> keySet()
public java.lang.String remove(java.lang.Object key)
public int size()
public java.util.Collection<java.lang.String> values()
public void writeNameMap(java.io.OutputStream stream)
stream
- the stream to write the table topublic void writeNameMap(java.io.File file) throws java.io.FileNotFoundException, java.io.IOException
file
- the file to write the table tojava.io.FileNotFoundException
- if the file exists but is a directory rather than a regular file, does not exist but cannot be created, or cannot be opened for any other reasonjava.lang.SecurityException
- if a security manager exists and its checkWrite method denies write access to the file.java.io.IOException