- java.lang.Object
-
- inet.ipaddr.AddressStringParameters
-
- inet.ipaddr.MACAddressStringParameters
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Cloneable,java.lang.Comparable<MACAddressStringParameters>
public class MACAddressStringParameters extends AddressStringParameters implements java.lang.Comparable<MACAddressStringParameters>
This class allows you to control the validation performed by the classIPAddressString. TheIPAddressStringclass uses a default permissive IPAddressStringParameters instance 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 classMACAddressStringParameters.AddressSizestatic classMACAddressStringParameters.Builderstatic classMACAddressStringParameters.MACAddressStringFormatParameters-
Nested classes/interfaces inherited from class inet.ipaddr.AddressStringParameters
AddressStringParameters.AddressStringFormatParameters, AddressStringParameters.BuilderBase, AddressStringParameters.RangeParameters
-
-
Field Summary
Fields Modifier and Type Field Description MACAddressStringParameters.AddressSizeaddressSizeWhether * is considered to be MAC 6 bytes, EUI-64 8 bytes, or either onebooleanallowColonDelimitedAllows addresses like aa:bb:cc:dd:ee:ffbooleanallowDashedAllows addresses like aa-bb-cc-dd-ee-ffbooleanallowDottedAllows addresses like aaa.bbb.ccc.dddbooleanallowSingleDashedAllows addresses like aabbcc-ddeeffbooleanallowSpaceDelimitedAllows addresses like aa bb cc dd ee ffstatic booleanDEFAULT_ALLOW_COLON_DELIMITEDstatic booleanDEFAULT_ALLOW_DASHEDstatic booleanDEFAULT_ALLOW_DOTTEDstatic booleanDEFAULT_ALLOW_SINGLE_DASHEDstatic booleanDEFAULT_ALLOW_SPACE_DELIMITED-
Fields inherited from class inet.ipaddr.AddressStringParameters
allowAll, allowEmpty, allowSingleSegment, DEFAULT_ALLOW_ALL, DEFAULT_ALLOW_EMPTY, DEFAULT_ALLOW_SINGLE_SEGMENT
-
-
Constructor Summary
Constructors Constructor Description MACAddressStringParameters(boolean allowEmpty, boolean allowAll, MACAddressStringParameters.AddressSize allAddresses, boolean allowSingleSegment, boolean allowDashed, boolean allowSingleDashed, boolean allowColonDelimited, boolean allowDotted, boolean allowSpaceDelimited, MACAddressStringParameters.MACAddressStringFormatParameters formatOpts, MACAddressNetwork network)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MACAddressStringParametersclone()intcompareTo(MACAddressStringParameters o)booleanequals(java.lang.Object o)MACAddressStringParameters.MACAddressStringFormatParametersgetFormatParameters()MACAddressNetworkgetNetwork()inthashCode()MACAddressStringParameters.BuildertoBuilder()-
Methods inherited from class inet.ipaddr.AddressStringParameters
compareTo, toBuilder
-
-
-
-
Field Detail
-
DEFAULT_ALLOW_DASHED
public static final boolean DEFAULT_ALLOW_DASHED
- See Also:
- Constant Field Values
-
DEFAULT_ALLOW_SINGLE_DASHED
public static final boolean DEFAULT_ALLOW_SINGLE_DASHED
- See Also:
- Constant Field Values
-
DEFAULT_ALLOW_COLON_DELIMITED
public static final boolean DEFAULT_ALLOW_COLON_DELIMITED
- See Also:
- Constant Field Values
-
DEFAULT_ALLOW_DOTTED
public static final boolean DEFAULT_ALLOW_DOTTED
- See Also:
- Constant Field Values
-
DEFAULT_ALLOW_SPACE_DELIMITED
public static final boolean DEFAULT_ALLOW_SPACE_DELIMITED
- See Also:
- Constant Field Values
-
addressSize
public final MACAddressStringParameters.AddressSize addressSize
Whether * is considered to be MAC 6 bytes, EUI-64 8 bytes, or either one
-
allowDashed
public final boolean allowDashed
Allows addresses like aa-bb-cc-dd-ee-ff
-
allowSingleDashed
public final boolean allowSingleDashed
Allows addresses like aabbcc-ddeeff
-
allowColonDelimited
public final boolean allowColonDelimited
Allows addresses like aa:bb:cc:dd:ee:ff
-
allowDotted
public final boolean allowDotted
Allows addresses like aaa.bbb.ccc.ddd
-
allowSpaceDelimited
public final boolean allowSpaceDelimited
Allows addresses like aa bb cc dd ee ff
-
-
Constructor Detail
-
MACAddressStringParameters
public MACAddressStringParameters(boolean allowEmpty, boolean allowAll, MACAddressStringParameters.AddressSize allAddresses, boolean allowSingleSegment, boolean allowDashed, boolean allowSingleDashed, boolean allowColonDelimited, boolean allowDotted, boolean allowSpaceDelimited, MACAddressStringParameters.MACAddressStringFormatParameters formatOpts, MACAddressNetwork network)
-
-
Method Detail
-
toBuilder
public MACAddressStringParameters.Builder toBuilder()
-
getNetwork
public MACAddressNetwork getNetwork()
-
getFormatParameters
public MACAddressStringParameters.MACAddressStringFormatParameters getFormatParameters()
-
clone
public MACAddressStringParameters clone()
- Overrides:
clonein classAddressStringParameters
-
compareTo
public int compareTo(MACAddressStringParameters o)
- Specified by:
compareToin interfacejava.lang.Comparable<MACAddressStringParameters>
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classAddressStringParameters
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-