the IPv4 or IPv6 address, as bytes
Overloaded "==" method to test for equality.
Overloaded "==" method to test for equality.
object against which to test this object
true
if equal, false
if not
Overloaded hash method: Ensures that two IPAddress
objects
that represent the same IP address have the same hash code.
Overloaded hash method: Ensures that two IPAddress
objects
that represent the same IP address have the same hash code.
the hash code
Convert this IPAddress
to its corresponding java.net.InetAddress
object.
Convert this IPAddress
to its corresponding java.net.InetAddress
object. Note that you can _also_ use the implicit conversions provided
by grizzled.net.Implicits
.
the corresponding InetAddress
Convert the IP address to a number, suitable for numeric comparisons against other IP addresses.
Convert the IP address to a number, suitable for numeric comparisons
against other IP addresses. The number is returned as a BigInt
to
allow for both IPv4 and IPv6 addresses.
the number
Return a printable version of this IP address.
Return a printable version of this IP address.
the printable version
Represents an IP address. This class is similar to
java.net.InetAddress
, but it's designed to be more intuitive and easier to use from Scala. This package provides implicit converters to make this class compatible withjava.net.InetAddress
. The converters ensure that all the (non-static) methods defined in thejava.net.InetAddress
class are directly callable from an instance of the ScalaIPAddress
class. For instance, the following code is perfectly legal:Here's an IPv6 example: