public class IPv6AddressRange extends Object implements Comparable<IPv6AddressRange>, Iterable<IPv6Address>
Modifier and Type | Method and Description |
---|---|
int |
compareTo(IPv6AddressRange that)
The natural order of
IPv6AddressRange s orders them on increasing first addresses, and on increasing last
address if the first address would be equal. |
boolean |
contains(IPv6Address address) |
boolean |
contains(IPv6AddressRange range) |
boolean |
equals(Object o) |
IPv6AddressRange |
extend(IPv6Address address)
Extend the range just enough at its head or tail such that the given address is included.
|
static IPv6AddressRange |
fromFirstAndLast(IPv6Address first,
IPv6Address last) |
IPv6Address |
getFirst() |
IPv6Address |
getLast() |
int |
hashCode() |
Iterator<IPv6Address> |
iterator() |
boolean |
overlaps(IPv6AddressRange range) |
List<IPv6AddressRange> |
remove(IPv6Address address)
Remove an address from the range, resulting in one, none or two new ranges.
|
List<IPv6AddressRange> |
remove(IPv6Network network)
Remove a network from the range, resulting in one, none or two new ranges.
|
BigInteger |
size() |
String |
toLongString() |
String |
toString() |
public static IPv6AddressRange fromFirstAndLast(IPv6Address first, IPv6Address last)
public boolean contains(IPv6Address address)
public boolean contains(IPv6AddressRange range)
public boolean overlaps(IPv6AddressRange range)
public Iterator<IPv6Address> iterator()
iterator
in interface Iterable<IPv6Address>
public BigInteger size()
public List<IPv6AddressRange> remove(IPv6Address address)
address
- adddress to remove from the rangepublic IPv6AddressRange extend(IPv6Address address)
address
- address to extend the range topublic List<IPv6AddressRange> remove(IPv6Network network)
network
- network to remove from the rangepublic String toLongString()
toString
but without using shorthand notations for addressespublic int compareTo(IPv6AddressRange that)
IPv6AddressRange
s orders them on increasing first addresses, and on increasing last
address if the first address would be equal.
Note that the natural order does thus not compare sizes of ranges.compareTo
in interface Comparable<IPv6AddressRange>
that
- range to compare withpublic IPv6Address getFirst()
public IPv6Address getLast()
Copyright © 2013. All Rights Reserved.