Deprecated
DomainNameMapping instances.
| Modifier and Type | Class and Description |
|---|---|
| private static class | DomainNameMappingBuilder.ImmutableDomainNameMapping<
concrete type of value objects V>
Deprecated
as a consequence of Immutable mapping from domain name pattern to its associated value object.
DomainNameMapping being deprecated.
|
| Access | Constructor and Description |
|---|---|
| public | DomainNameMappingBuilder(V
the default value for defaultValue)DomainNameMapping#map(String) to return
when nothing matches the inputConstructor with default initial capacity of the map holding the mappings |
| public | DomainNameMappingBuilder(int
initial capacity for the internal map initialCapacity, V the default value for defaultValue)DomainNameMapping#map(String) to return
when nothing matches the inputConstructor with initial capacity of the map holding the mappings |
| Modifier and Type | Method and Description |
|---|---|
| public DomainNameMappingBuilder | add(String
the host name (optionally wildcard) hostname, V the output value that will be returned by output)DomainNameMapping#map(String)
when the specified host name matches the specified input host name
Deprecated
as a consequence of
Adds a mapping that maps the specified (optionally wildcard) host name to the specified output value.
DomainNameMappingBuilder being deprecated.
|
| public DomainNameMapping | Returns: newDomainNameMapping instance
Deprecated
as a consequence of
Creates a new instance of immutable DomainNameMapping being deprecated.
DomainNameMapping
Attempts to add new mappings to the result object will cause UnsupportedOperationException to be thrown
|
| defaultValue | back to summary |
|---|---|
| private final V defaultValue | |
| map | back to summary |
|---|---|
| private final Map<String, V> map | |
| DomainNameMappingBuilder | back to summary |
|---|---|
| public DomainNameMappingBuilder(V defaultValue) Constructor with default initial capacity of the map holding the mappings
| |
| DomainNameMappingBuilder | back to summary |
|---|---|
| public DomainNameMappingBuilder(int initialCapacity, V defaultValue) Constructor with initial capacity of the map holding the mappings
| |
| add | back to summary |
|---|---|
| public DomainNameMappingBuilder Deprecated as a consequence of Adds a mapping that maps the specified (optionally wildcard) host name to the specified output value. Null values are forbidden for both hostnames and values.
DNS wildcard is supported as hostname.
For example, you can use
| |
| build | back to summary |
|---|---|
| public DomainNameMapping Deprecated as a consequence of Creates a new instance of immutable
| |
Deprecated
as a consequence of DomainNameMapping being deprecated. See corresponding docs for further information.
| Modifier and Type | Field and Description |
|---|---|
| private final String[] | |
| private final Map | |
| private static final int | |
| private static final String | |
| private static final String | |
| private static final String | |
| private final V[] |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public DomainNameMapping | add(String
the host name (optionally wildcard) hostname, V the output value that will be returned by output)map(String) when the specified host name
matches the specified input host nameOverrides io.
Deprecated
Adds a mapping that maps the specified (optionally wildcard) host name to the specified output value.
|
| private StringBuilder | |
| private static StringBuilder | |
| public Map | asMap()
Overrides io. Map of the domain mapping patterns and their associated value objects.
|
| private static int | Returns: estimated length of string returned bytoString()length of string representation of defaultValueLength, int defaultValuenumber of mappings the given instance holds,
e.g. numberOfMappings, int domainNamePatterns#lengthestimated size taken by one mapping estimatedMappingLength)Estimates the length of string representation of the given instance: est = lengthOfConstantComponents + defaultValueLength + (estimatedMappingLength * numOfMappings) * 1.10 |
| public V | map(String hostname)
Overrides io. Implements io. |
| public String | toString()
Overrides io. |
| domainNamePatterns | back to summary |
|---|---|
| private final String[] domainNamePatterns | |
| map | back to summary |
|---|---|
| private final Map<String, V> map | |
| REPR_CONST_PART_LENGTH | back to summary |
|---|---|
| private static final int REPR_CONST_PART_LENGTH | |
| REPR_HEADER | back to summary |
|---|---|
| private static final String REPR_HEADER | |
| REPR_MAP_CLOSING | back to summary |
|---|---|
| private static final String REPR_MAP_CLOSING | |
| REPR_MAP_OPENING | back to summary |
|---|---|
| private static final String REPR_MAP_OPENING | |
| values | back to summary |
|---|---|
| private final V[] values | |
| ImmutableDomainNameMapping | back to summary |
|---|---|
private ImmutableDomainNameMapping(V defaultValue, Map<String, V> map)
| |
| add | back to summary |
|---|---|
| public DomainNameMapping Overrides io. Doc from io. Deprecated
Adds a mapping that maps the specified (optionally wildcard) host name to the specified output value.
DNS wildcard is supported as hostname.
For example, you can use
| |
| appendMapping | back to summary |
|---|---|
| private StringBuilder appendMapping(StringBuilder sb, int mappingIndex) | |
| appendMapping | back to summary |
|---|---|
| private static StringBuilder appendMapping(StringBuilder sb, String domainNamePattern, String value) | |
| asMap | back to summary |
|---|---|
| public Map Overrides io. Doc from io. Returns a read-only
| |
| estimateBufferSize | back to summary |
|---|---|
| private static int estimateBufferSize(int defaultValueLength, int numberOfMappings, int estimatedMappingLength) Estimates the length of string representation of the given instance: est = lengthOfConstantComponents + defaultValueLength + (estimatedMappingLength * numOfMappings) * 1.10
| |
| map | back to summary |
|---|---|
| public V map(String hostname) Overrides io. Implements io. Doc from io. Returns mapped value of the specified input.
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides io. Doc from java. Returns a string representation of the object. | |