java.lang.Object
de.powerstat.validation.values.IPV6Mask
- All Implemented Interfaces:
IValueObject
,Comparable<IPV6Mask>
IP V6 mask.
Not DSGVO relevant.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
Compare with another object.boolean
Is equal with another object.int
hashCode()
Calculate hash code.int
intValue()
Returns the value of this IPV6Mask as an int.static IPV6Mask
of
(int length) IPV6Mask factory.static IPV6Mask
IPV6Mask factory.Returns the value of this IPV6Mask as an String.toString()
Returns the string representation of this IPV4Address.
-
Field Details
-
length
private final int lengthPrefix length.
-
-
Constructor Details
-
IPV6Mask
private IPV6Mask(int length) Constructor.- Parameters:
length
- Prefix length (0-128)- Throws:
IndexOutOfBoundsException
- if the prefix length is < 0 or > 128
-
-
Method Details
-
of
IPV6Mask factory.- Parameters:
length
- IP V6 prefix length (0-128)- Returns:
- IPV6Mask object
-
of
IPV6Mask factory.- Parameters:
value
- IP V6 prefix length string (0-128)- Returns:
- IPV6Mask object
-
intValue
public int intValue()Returns the value of this IPV6Mask as an int.- Returns:
- The numeric value represented by this object after conversion to type int (0-128).
-
stringValue
Returns the value of this IPV6Mask as an String.- Specified by:
stringValue
in interfaceIValueObject
- Returns:
- The numeric value represented by this object after conversion to type String (0-128).
-
hashCode
public int hashCode()Calculate hash code. -
equals
Is equal with another object. -
toString
Returns the string representation of this IPV4Address. The exact details of this representation are unspecified and subject to change, but the following may be regarded as typical: "IPV6Mask[length=128, mask=]" -
compareTo
Compare with another object.- Specified by:
compareTo
in interfaceComparable<IPV6Mask>
- Parameters:
obj
- Object to compare with- Returns:
- 0: equal; 1: greater; -1: smaller
- See Also:
-