- 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. TheHostNameclass 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 classHostNameParameters.Builder
-
Field Summary
Fields Modifier and Type Field Description IPAddressStringParametersaddressOptionsbooleanallowBracketedIPv4booleanallowBracketedIPv6booleanallowEmptybooleanallowIPAddressbooleanallowPortbooleanallowServicestatic booleanDEFAULT_ACCEPT_BRACKETED_IPV4static booleanDEFAULT_ACCEPT_BRACKETED_IPV6static booleanDEFAULT_ALLOW_EMPTYstatic booleanDEFAULT_ALLOW_IP_ADDRESSstatic booleanDEFAULT_ALLOW_PORTstatic booleanDEFAULT_ALLOW_SERVICEstatic booleanDEFAULT_EMPTY_IS_LOOPBACKstatic booleanDEFAULT_EXPECT_PORTstatic booleanDEFAULT_NORMALIZE_TO_LOWER_CASEbooleanemptyIsLoopbackbooleanexpectPortbooleannormalizeToLowercase
-
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 HostNameParametersclone()intcompareTo(HostNameParameters o)booleanequals(java.lang.Object o)inthashCode()IPAddressStringParameters.BuildertoAddressOptionsBuilder()HostNameParameters.BuildertoBuilder()
-
-
-
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:
compareToin interfacejava.lang.Comparable<HostNameParameters>
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-