V
- concrete type of value objectsDomainNameMappingBuilder
instead.@Deprecated
public final class DomainMappingBuilder<V>
extends java.lang.Object
DomainNameMapping
instances.构造器和说明 |
---|
DomainMappingBuilder(int initialCapacity,
V defaultValue)
已过时。
Constructor with initial capacity of the map holding the mappings
|
DomainMappingBuilder(V defaultValue)
已过时。
Constructor with default initial capacity of the map holding the mappings
|
限定符和类型 | 方法和说明 |
---|---|
DomainMappingBuilder<V> |
add(java.lang.String hostname,
V output)
已过时。
Adds a mapping that maps the specified (optionally wildcard) host name to the specified output value.
|
DomainNameMapping<V> |
build()
已过时。
Creates a new instance of immutable
DomainNameMapping
Attempts to add new mappings to the result object will cause UnsupportedOperationException to be thrown |
public DomainMappingBuilder(V defaultValue)
defaultValue
- the default value for DomainNameMapping.map(String)
to return
when nothing matches the inputpublic DomainMappingBuilder(int initialCapacity, V defaultValue)
initialCapacity
- initial capacity for the internal mapdefaultValue
- the default value for DomainNameMapping.map(String)
to return
when nothing matches the inputpublic DomainMappingBuilder<V> add(java.lang.String hostname, V output)
DNS wildcard is supported as hostname.
For example, you can use *.netty.io
to match netty.io
and downloads.netty.io
.
hostname
- the host name (optionally wildcard)output
- the output value that will be returned by DomainNameMapping.map(String)
when the specified host name matches the specified input host namepublic DomainNameMapping<V> build()
DomainNameMapping
Attempts to add new mappings to the result object will cause UnsupportedOperationException
to be thrownDomainNameMapping
instance