Constructs a Cidr address from this address.
Narrows this address to an Ipv4Address if that is the underlying type.
Narrows this address to an Ipv4Address if that is the underlying type.
Narrows this address to an Ipv6Address if that is the underlying type.
Narrows this address to an Ipv6Address if that is the underlying type.
Converts this address to a multicast address, as long as it is in the multicast address range.
Converts this address to a multicast address, as long as it is in the multicast address range.
Converts this address to a source specific multicast address, as long as it is in the source specific multicast address range.
Converts this address to a source specific multicast address, as long as it is in the source specific multicast address range.
Converts this address to a value of type A
using the supplied functions.
Converts this address to a value of type A
using the supplied functions.
Returns true if this address is in the multicast range.
Returns true if this address is in the multicast range.
Returns true if this address is in the source specific multicast range.
Returns true if this address is in the source specific multicast range.
Applies the supplied mask to this address.
Applies the supplied mask to this address.
scala> ipv4"192.168.29.1".masked(ipv4"255.255.0.0") res0: Ipv4Address = 192.168.0.0
Computes the last address in the network identified by applying the supplied mask to this address.
Computes the last address in the network identified by applying the supplied mask to this address.
scala> ipv4"192.168.29.1".maskedLast(ipv4"255.255.0.0") res0: Ipv4Address = 192.168.255.255
Gets the IPv4 address after this address, with overflow from 255.255.255.255
to 0.0.0.0
.
Gets the IPv4 address after this address, with overflow from 255.255.255.255
to 0.0.0.0
.
Gets the IPv4 address before this address, with underflow from 0.0.0.0
to 255.255.255.255
.
Gets the IPv4 address before this address, with underflow from 0.0.0.0
to 255.255.255.255
.
Converts this address to a network order byte array of either 4 or 16 bytes.
Converts this address to a network order byte array of either 4 or 16 bytes.
Converts this V4 address to a compat V6 address, where the first 12 bytes are all zero and the last 4 bytes contain the bytes of this V4 address.
Converts this address to a 32-bit unsigned integer.
Converts this V4 address to a mapped V6 address, where the first 10 bytes are all zero,
the next two bytes are ff
, and the last 4 bytes contain the bytes of this V4 address.
Returns the dotted decimal representation of this address.
Returns the dotted decimal representation of this address.
Converts this address to a string form that is compatible for use in a URI per RFC3986 (namely, IPv6 addresses are rendered in condensed form and surrounded by brackets).
Converts this address to a string form that is compatible for use in a URI per RFC3986 (namely, IPv6 addresses are rendered in condensed form and surrounded by brackets).
Maps a type-preserving function across this IP address.
Maps a type-preserving function across this IP address.
Representation of an IPv4 address that works on both the JVM and Scala.js.