- java.lang.Object
-
- inet.ipaddr.AddressStringParameters.AddressStringFormatParameters
-
- inet.ipaddr.IPAddressStringParameters.IPAddressStringFormatParameters
-
- inet.ipaddr.ipv4.IPv4AddressStringParameters
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Cloneable
,java.lang.Comparable<IPv4AddressStringParameters>
public class IPv4AddressStringParameters extends IPAddressStringParameters.IPAddressStringFormatParameters implements java.lang.Comparable<IPv4AddressStringParameters>
The IPv4-specific parameters within aIPAddressStringParameters
instance.- Author:
- sfoley
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
IPv4AddressStringParameters.Builder
-
Field Summary
Fields Modifier and Type Field Description static boolean
DEFAULT_ALLOW_IPV4_INET_ATON
static boolean
DEFAULT_ALLOW_IPV4_INET_ATON_SINGLE_SEGMENT_MASK
boolean
inet_aton_hex
Allows ipv4 inet_aton hexadecimal format 0xa.0xb.0xc.0xdboolean
inet_aton_joinedSegments
Allows ipv4 joined segments like 1.2.3, 1.2, or just 1 For the case of just 1 segment, the behaviour is controlled byAddressStringParameters.allowSingleSegment
boolean
inet_aton_leading_zeros
Allows ipv4 inet_aton hexadecimal or octal to have leading zeros, such as in the first two segments of 0x0a.00b.c.d The first 0 is not considered a leading zero, it either denotes octal or hex depending on whether it is followed by an 'x'.boolean
inet_aton_octal
Allows ipv4 inet_aton octal format, 04.05.06.07 being an example.boolean
inet_aton_single_segment_mask
If you allow ipv4 joined segments, whether you allow a mask that looks like a prefix length: 1.2.3.5/255-
Fields inherited from class inet.ipaddr.IPAddressStringParameters.IPAddressStringFormatParameters
allowBinary, allowPrefixesBeyondAddressSize, allowPrefixLengthLeadingZeros, DEFAULT_ALLOW_BINARY, DEFAULT_ALLOW_PREFIX_BEYOND_ADDRESS_SIZE, DEFAULT_ALLOW_PREFIX_LENGTH_LEADING_ZEROS
-
Fields inherited from class inet.ipaddr.AddressStringParameters.AddressStringFormatParameters
allowLeadingZeros, allowUnlimitedLeadingZeros, allowWildcardedSeparator, DEFAULT_ALLOW_LEADING_ZEROS, DEFAULT_ALLOW_UNLIMITED_LEADING_ZEROS, DEFAULT_ALLOW_WILDCARDED_SEPARATOR, DEFAULT_RANGE_OPTIONS, rangeOptions
-
-
Constructor Summary
Constructors Constructor Description IPv4AddressStringParameters(boolean allowLeadingZeros, boolean allowCIDRPrefixLeadingZeros, boolean allowUnlimitedLeadingZeros, AddressStringParameters.RangeParameters rangeOptions, boolean allowWildcardedSeparator, boolean allowPrefixesBeyondAddressSize, boolean allowBinary, boolean inet_aton_hex, boolean inet_aton_octal, boolean inet_aton_leading_zeros, boolean inet_aton_joinedSegments, boolean inet_aton_single_segment_mask, IPv4AddressNetwork network)
Constructs the parameters for IPv4-specific string parsing.IPv4AddressStringParameters(boolean allowLeadingZeros, boolean allowCIDRPrefixLeadingZeros, boolean allowUnlimitedLeadingZeros, AddressStringParameters.RangeParameters rangeOptions, boolean allowWildcardedSeparator, boolean allowPrefixesBeyondAddressSize, boolean inet_aton_hex, boolean inet_aton_octal, boolean inet_aton_leading_zeros, boolean inet_aton_joinedSegments, boolean inet_aton_single_segment_mask, IPv4AddressNetwork network)
Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IPv4AddressStringParameters
clone()
int
compareTo(IPv4AddressStringParameters o)
boolean
equals(java.lang.Object o)
IPv4AddressNetwork
getNetwork()
int
hashCode()
IPv4AddressStringParameters.Builder
toBuilder()
-
-
-
Field Detail
-
DEFAULT_ALLOW_IPV4_INET_ATON
public static final boolean DEFAULT_ALLOW_IPV4_INET_ATON
- See Also:
- Constant Field Values
-
DEFAULT_ALLOW_IPV4_INET_ATON_SINGLE_SEGMENT_MASK
public static final boolean DEFAULT_ALLOW_IPV4_INET_ATON_SINGLE_SEGMENT_MASK
- See Also:
- Constant Field Values
-
inet_aton_hex
public final boolean inet_aton_hex
Allows ipv4 inet_aton hexadecimal format 0xa.0xb.0xc.0xd
-
inet_aton_octal
public final boolean inet_aton_octal
Allows ipv4 inet_aton octal format, 04.05.06.07 being an example. Can be overridden byAddressStringParameters.AddressStringFormatParameters.allowLeadingZeros
-
inet_aton_leading_zeros
public final boolean inet_aton_leading_zeros
Allows ipv4 inet_aton hexadecimal or octal to have leading zeros, such as in the first two segments of 0x0a.00b.c.d The first 0 is not considered a leading zero, it either denotes octal or hex depending on whether it is followed by an 'x'. Zeros that appear afterwards are inet_aton leading zeros.
-
inet_aton_joinedSegments
public final boolean inet_aton_joinedSegments
Allows ipv4 joined segments like 1.2.3, 1.2, or just 1 For the case of just 1 segment, the behaviour is controlled byAddressStringParameters.allowSingleSegment
-
inet_aton_single_segment_mask
public final boolean inet_aton_single_segment_mask
If you allow ipv4 joined segments, whether you allow a mask that looks like a prefix length: 1.2.3.5/255
-
-
Constructor Detail
-
IPv4AddressStringParameters
@Deprecated public IPv4AddressStringParameters(boolean allowLeadingZeros, boolean allowCIDRPrefixLeadingZeros, boolean allowUnlimitedLeadingZeros, AddressStringParameters.RangeParameters rangeOptions, boolean allowWildcardedSeparator, boolean allowPrefixesBeyondAddressSize, boolean inet_aton_hex, boolean inet_aton_octal, boolean inet_aton_leading_zeros, boolean inet_aton_joinedSegments, boolean inet_aton_single_segment_mask, IPv4AddressNetwork network)
Deprecated.Retained for backwards compatibility
Library users are strongly encourage to use the builder classes instead of this constructor.
-
IPv4AddressStringParameters
public IPv4AddressStringParameters(boolean allowLeadingZeros, boolean allowCIDRPrefixLeadingZeros, boolean allowUnlimitedLeadingZeros, AddressStringParameters.RangeParameters rangeOptions, boolean allowWildcardedSeparator, boolean allowPrefixesBeyondAddressSize, boolean allowBinary, boolean inet_aton_hex, boolean inet_aton_octal, boolean inet_aton_leading_zeros, boolean inet_aton_joinedSegments, boolean inet_aton_single_segment_mask, IPv4AddressNetwork network)
Constructs the parameters for IPv4-specific string parsing.
Users are strongly encouraged to use the nested Builder class instead of this constructor.- Parameters:
allowLeadingZeros
-allowCIDRPrefixLeadingZeros
-allowUnlimitedLeadingZeros
-rangeOptions
-allowWildcardedSeparator
-allowPrefixesBeyondAddressSize
-allowBinary
-inet_aton_hex
-inet_aton_octal
-inet_aton_leading_zeros
-inet_aton_joinedSegments
-inet_aton_single_segment_mask
-network
-
-
-
Method Detail
-
toBuilder
public IPv4AddressStringParameters.Builder toBuilder()
-
getNetwork
public IPv4AddressNetwork getNetwork()
- Specified by:
getNetwork
in classIPAddressStringParameters.IPAddressStringFormatParameters
-
clone
public IPv4AddressStringParameters clone()
-
compareTo
public int compareTo(IPv4AddressStringParameters o)
- Specified by:
compareTo
in interfacejava.lang.Comparable<IPv4AddressStringParameters>
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classIPAddressStringParameters.IPAddressStringFormatParameters
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classIPAddressStringParameters.IPAddressStringFormatParameters
-
-