- 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
. TheIPAddressString
class 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 class
MACAddressStringParameters.AddressSize
static class
MACAddressStringParameters.Builder
static class
MACAddressStringParameters.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.AddressSize
addressSize
Whether * is considered to be MAC 6 bytes, EUI-64 8 bytes, or either oneboolean
allowColonDelimited
Allows addresses like aa:bb:cc:dd:ee:ffboolean
allowDashed
Allows addresses like aa-bb-cc-dd-ee-ffboolean
allowDotted
Allows addresses like aaa.bbb.ccc.dddboolean
allowSingleDashed
Allows addresses like aabbcc-ddeeffboolean
allowSpaceDelimited
Allows addresses like aa bb cc dd ee ffstatic boolean
DEFAULT_ALLOW_COLON_DELIMITED
static boolean
DEFAULT_ALLOW_DASHED
static boolean
DEFAULT_ALLOW_DOTTED
static boolean
DEFAULT_ALLOW_SINGLE_DASHED
static boolean
DEFAULT_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 MACAddressStringParameters
clone()
int
compareTo(MACAddressStringParameters o)
boolean
equals(java.lang.Object o)
MACAddressStringParameters.MACAddressStringFormatParameters
getFormatParameters()
MACAddressNetwork
getNetwork()
int
hashCode()
MACAddressStringParameters.Builder
toBuilder()
-
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:
clone
in classAddressStringParameters
-
compareTo
public int compareTo(MACAddressStringParameters o)
- Specified by:
compareTo
in interfacejava.lang.Comparable<MACAddressStringParameters>
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classAddressStringParameters
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
-