Modifier and Type | Field and Description |
---|---|
private IPAddress |
address |
private static int |
CIDR_MAX |
private static int |
CIDR_MIN |
private IPAddress |
mask |
Constructor and Description |
---|
IPAddressRange(IPAddress address,
IPAddress mask)
Creates a new address range from an address an a subnet mask.
|
IPAddressRange(String string)
Creates a new address range from its string representation.
|
Modifier and Type | Method and Description |
---|---|
boolean |
apply(IPAddress input) |
com.google.common.collect.Range<IPAddress> |
asRange() |
boolean |
contains(IPAddress ip)
Checks if a given IP address is in this range.
|
boolean |
equals(Object obj) |
IPAddress |
getAddress() |
IPAddress |
getHigh() |
IPAddress |
getLow() |
IPAddress |
getSubnetMask() |
int |
hashCode() |
String |
toString() |
private static final int CIDR_MAX
private static final int CIDR_MIN
private final IPAddress address
private final IPAddress mask
public IPAddressRange(String string)
192.168.1.1/24 192.168.1.1/255.255.255.0
string
- the string representationpublic IPAddress getAddress()
public IPAddress getSubnetMask()
public IPAddress getHigh()
public IPAddress getLow()
public boolean contains(IPAddress ip)
ip
- the addresspublic com.google.common.collect.Range<IPAddress> asRange()
Range
public boolean apply(IPAddress input)
apply
in interface com.google.common.base.Predicate<IPAddress>
public boolean equals(Object obj)
Copyright © 2012-2015 52north.org. All Rights Reserved.