public final class IPv6AddressPool extends Object
Modifier and Type | Method and Description |
---|---|
IPv6AddressPool |
allocate()
Allocate the first available subnet from the pool.
|
IPv6AddressPool |
allocate(IPv6Network toAllocate)
Allocate the given subnet from the pool.
|
boolean |
contains(IPv6Address address) |
boolean |
contains(IPv6AddressRange range) |
IPv6AddressPool |
deAllocate(IPv6Network toDeAllocate)
Give a network back to the pool (de-allocate).
|
boolean |
equals(Object o) |
Iterable<IPv6Network> |
freeNetworks() |
static IPv6AddressPool |
fromRangeAndSubnet(IPv6AddressRange range,
IPv6NetworkMask allocationSubnetSize)
Create a pool of the given range (boundaries inclusive) which is completely free.
|
IPv6Address |
getFirst() |
IPv6Address |
getLast() |
IPv6Network |
getLastAllocated() |
int |
hashCode() |
boolean |
isExhausted() |
boolean |
isFree(IPv6Network network) |
boolean |
overlaps(IPv6AddressRange range) |
String |
toLongString() |
String |
toString() |
public static IPv6AddressPool fromRangeAndSubnet(IPv6AddressRange range, IPv6NetworkMask allocationSubnetSize)
range
- range from within to allocateallocationSubnetSize
- size of the subnets that will be allocatedpublic IPv6Network getLastAllocated()
public IPv6AddressPool allocate()
public IPv6AddressPool allocate(IPv6Network toAllocate)
toAllocate
- subnet to allocate from the poolpublic IPv6AddressPool deAllocate(IPv6Network toDeAllocate)
toDeAllocate
- network to de-allocatepublic boolean isExhausted()
public boolean isFree(IPv6Network network)
public Iterable<IPv6Network> freeNetworks()
public boolean contains(IPv6Address address)
public boolean contains(IPv6AddressRange range)
public boolean overlaps(IPv6AddressRange range)
public IPv6Address getFirst()
public IPv6Address getLast()
public String toLongString()
toString
but without using shorthand notations for addressesCopyright © 2013. All Rights Reserved.