public final class CidrAddr extends Object
| Constructor and Description |
|---|
CidrAddr(org.onlab.packet.IpAddress ip,
org.onlab.packet.IpPrefix prefix)
Constructor for a given IP address and prefix.
|
| Modifier and Type | Method and Description |
|---|---|
String |
cidr()
Converts a network address to a CIDR notation.
|
boolean |
equals(Object obj) |
int |
hashCode() |
org.onlab.packet.IpAddress |
ip()
Returns the IP address value of the network address.
|
org.onlab.packet.IpPrefix |
prefix()
Returns the IP prefix value of the network address.
|
String |
toString() |
static CidrAddr |
valueOf(String cidr)
Converts a CIDR notation string into a network address.
|
public CidrAddr(org.onlab.packet.IpAddress ip,
org.onlab.packet.IpPrefix prefix)
ip - ip addressprefix - ip prefixpublic static CidrAddr valueOf(String cidr)
cidr - cidrIllegalArgumentException - if the cidr is not validpublic org.onlab.packet.IpAddress ip()
public org.onlab.packet.IpPrefix prefix()
public String cidr()
Copyright © 2018. All rights reserved.