public class ConfigurationToName
extends java.lang.Object
RecorderElementMap) a readable text form. Instances of
this class are created on request by RecorderElementMap.| Modifier and Type | Class and Description |
|---|---|
private class |
ConfigurationToName.PosEntry
Stores an entry i9n the configuration denoting a concrete variability,
its binary-charId-to-variant-mapping and the name of the variability.
|
| Modifier and Type | Field and Description |
|---|---|
private java.lang.String |
notAvailable
Stops the not-available-string.
|
private ConfigurationToName.PosEntry[] |
valToName
Stores the correspondences between position in the configuration and
variability at the respective positions.
|
| Constructor and Description |
|---|
ConfigurationToName(int size)
Creates an new configuration-to-name mapping.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
configurationHeadline(java.lang.String separator)
Returns a headline for configurations, i.e. the names of the variants
separated by
separator. |
java.lang.String |
formatConfiguration(java.lang.String configuration,
java.lang.String separator)
Formats a binary string notation of a configuration to readable text.
|
java.lang.String |
getName(int index)
Returns the name of the variant at the specified position.
|
(package private) void |
put(java.lang.String id,
char separator,
int index,
char value)
Adds a variant to this formatting instance.
|
void |
setNotAvailable(java.lang.String notAvailable)
Modifies the text to be printed in case of not-available variants (i.e.
|
private ConfigurationToName.PosEntry[] valToName
private java.lang.String notAvailable
N/A.ConfigurationToName(int size)
size - the number of variants in the configuration (length of the
configuration)public void setNotAvailable(java.lang.String notAvailable)
notAvailable - the new not-available Stringvoid put(java.lang.String id,
char separator,
int index,
char value)
id - the name (identification) of the variant given as
variability-nameseparatorvariant-nameseparator - the separator between variability and variantindex - the position of the variability in the configurationvalue - the binary representant of the variantpublic java.lang.String configurationHeadline(java.lang.String separator)
separator.separator - the text for separating the variants (usually ",")public java.lang.String formatConfiguration(java.lang.String configuration,
java.lang.String separator)
configuration - the configuration to be printedseparator - the separator to be used, e.g. "|"public java.lang.String getName(int index)
index - the index of the variant to be printed