- java.lang.Object
-
- inet.ipaddr.HostNameParameters
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Cloneable
,java.lang.Comparable<HostNameParameters>
public class HostNameParameters extends java.lang.Object implements java.lang.Cloneable, java.lang.Comparable<HostNameParameters>, java.io.Serializable
This class allows you to control the validation performed by the classHostName
. TheHostName
class uses a default permissive HostNameParameters object when you do not specify one. If you wish to use parameters different from the default, then use this class. All instances are immutable and must be constructed with the nested Builder class.- Author:
- sfoley
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
HostNameParameters.Builder
-
Field Summary
Fields Modifier and Type Field Description IPAddressStringParameters
addressOptions
boolean
allowBracketedIPv4
boolean
allowBracketedIPv6
boolean
allowEmpty
boolean
allowIPAddress
boolean
allowPort
boolean
allowService
static boolean
DEFAULT_ACCEPT_BRACKETED_IPV4
static boolean
DEFAULT_ACCEPT_BRACKETED_IPV6
static boolean
DEFAULT_ALLOW_EMPTY
static boolean
DEFAULT_ALLOW_IP_ADDRESS
static boolean
DEFAULT_ALLOW_PORT
static boolean
DEFAULT_ALLOW_SERVICE
static boolean
DEFAULT_EMPTY_IS_LOOPBACK
static boolean
DEFAULT_EXPECT_PORT
static boolean
DEFAULT_NORMALIZE_TO_LOWER_CASE
boolean
emptyIsLoopback
boolean
expectPort
boolean
normalizeToLowercase
-
Constructor Summary
Constructors Constructor Description HostNameParameters(IPAddressStringParameters addressOptions, boolean allowEmpty, boolean emptyIsLoopback, boolean allowBracketedIPv6, boolean allowBracketedIPv4, boolean normalizeToLowercase, boolean allowIPAddress, boolean allowPort, boolean expectPort, boolean allowService)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description HostNameParameters
clone()
int
compareTo(HostNameParameters o)
boolean
equals(java.lang.Object o)
int
hashCode()
IPAddressStringParameters.Builder
toAddressOptionsBuilder()
HostNameParameters.Builder
toBuilder()
-
-
-
Field Detail
-
DEFAULT_ALLOW_EMPTY
public static final boolean DEFAULT_ALLOW_EMPTY
- See Also:
- Constant Field Values
-
DEFAULT_EMPTY_IS_LOOPBACK
public static final boolean DEFAULT_EMPTY_IS_LOOPBACK
- See Also:
- Constant Field Values
-
DEFAULT_ACCEPT_BRACKETED_IPV6
public static final boolean DEFAULT_ACCEPT_BRACKETED_IPV6
- See Also:
- Constant Field Values
-
DEFAULT_ACCEPT_BRACKETED_IPV4
public static final boolean DEFAULT_ACCEPT_BRACKETED_IPV4
- See Also:
- Constant Field Values
-
DEFAULT_NORMALIZE_TO_LOWER_CASE
public static final boolean DEFAULT_NORMALIZE_TO_LOWER_CASE
- See Also:
- Constant Field Values
-
DEFAULT_ALLOW_IP_ADDRESS
public static final boolean DEFAULT_ALLOW_IP_ADDRESS
- See Also:
- Constant Field Values
-
DEFAULT_ALLOW_PORT
public static final boolean DEFAULT_ALLOW_PORT
- See Also:
- Constant Field Values
-
DEFAULT_EXPECT_PORT
public static final boolean DEFAULT_EXPECT_PORT
- See Also:
- Constant Field Values
-
DEFAULT_ALLOW_SERVICE
public static final boolean DEFAULT_ALLOW_SERVICE
- See Also:
- Constant Field Values
-
allowEmpty
public final boolean allowEmpty
-
emptyIsLoopback
public final boolean emptyIsLoopback
-
allowBracketedIPv4
public final boolean allowBracketedIPv4
-
allowBracketedIPv6
public final boolean allowBracketedIPv6
-
normalizeToLowercase
public final boolean normalizeToLowercase
-
allowIPAddress
public final boolean allowIPAddress
-
allowPort
public final boolean allowPort
-
allowService
public final boolean allowService
-
expectPort
public final boolean expectPort
-
addressOptions
public final IPAddressStringParameters addressOptions
-
-
Constructor Detail
-
HostNameParameters
public HostNameParameters(IPAddressStringParameters addressOptions, boolean allowEmpty, boolean emptyIsLoopback, boolean allowBracketedIPv6, boolean allowBracketedIPv4, boolean normalizeToLowercase, boolean allowIPAddress, boolean allowPort, boolean expectPort, boolean allowService)
-
-
Method Detail
-
toBuilder
public HostNameParameters.Builder toBuilder()
-
toAddressOptionsBuilder
public IPAddressStringParameters.Builder toAddressOptionsBuilder()
-
clone
public HostNameParameters clone()
-
compareTo
public int compareTo(HostNameParameters o)
- Specified by:
compareTo
in interfacejava.lang.Comparable<HostNameParameters>
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
-