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> ipv6"ff3b::1".masked(ipv6"fff0::") res0: Ipv6Address = ff30::
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> ipv6"ff3b::1".maskedLast(ipv6"fff0::") res0: Ipv6Address = ff3f:ffff:ffff:ffff:ffff:ffff:ffff:ffff
Gets the IPv6 address after this address, with overflow from ffff:ffff:....:ffff
to ::
.
Gets the IPv6 address after this address, with overflow from ffff:ffff:....:ffff
to ::
.
Gets the IPv6 address before this address, with underflow from ::
to ffff:ffff:....:ffff
.
Gets the IPv6 address before this address, with underflow from ::
to ffff:ffff:....:ffff
.
Converts this address to a 128-bit unsigned integer.
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 address to a string of form x:x:x:x:x:x:a.b.c.d
where
each x
represents 16-bits and a.b.c.d
is IPv4 dotted decimal notation.
Converts this address to a string of form x:x:x:x:x:x:a.b.c.d
where
each x
represents 16-bits and a.b.c.d
is IPv4 dotted decimal notation.
Consecutive 0 x
fields are condensed with ::
.
For example, the IPv4 address 127.0.0.1
can be converted to a compatible
IPv6 address via Ipv4Address#toCompatV6, which is represented as the string
::7f00:1
and the mixed string ::127.0.0.1
.
Similarly, 127.0.0.1
can be converted to a mapped V6 address via Ipv4Address#toMappedV6,
resulting in ::ffff:7f00:1
and the mixed string ::ffff:127.0.0.1
.
This format is described in RFC4291 section 2.2.3.
scala> ipv6"::7f00:1".toMixedString res0: String = ::127.0.0.1 scala> ipv6"ff3b:1234::ffab:7f00:1".toMixedString res0: String = ff3b:1234::ffab:127.0.0.1
Returns the condensed string representation of the array per RFC5952.
Returns the condensed string representation of the array per RFC5952.
Returns an uncondensed string representation of the array.
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 IPv6 address that works on both the JVM and Scala.js.