public class InterfaceIpAddress
extends java.lang.Object
Constructor and Description |
---|
InterfaceIpAddress(InterfaceIpAddress other)
Copy constructor.
|
InterfaceIpAddress(IpAddress ipAddress,
IpPrefix subnetAddress)
Constructor for a given IP address and a subnet address.
|
InterfaceIpAddress(IpAddress ipAddress,
IpPrefix subnetAddress,
IpAddress broadcastAddress)
Constructor for a given IP address and a subnet address.
|
InterfaceIpAddress(IpAddress ipAddress,
IpPrefix subnetAddress,
IpAddress broadcastAddress,
IpAddress peerAddress)
Constructor for a given IP address and a subnet address.
|
Modifier and Type | Method and Description |
---|---|
IpAddress |
broadcastAddress()
Gets the subnet IP broadcast address.
|
static IpAddress |
computeBroadcastAddress(IpAddress ipAddress,
IpPrefix subnetAddress)
Compute the IP broadcast address.
|
boolean |
equals(java.lang.Object other) |
int |
hashCode() |
IpAddress |
ipAddress()
Gets the IP address.
|
IpAddress |
peerAddress()
Gets the IP point-to-point interface peer address.
|
IpPrefix |
subnetAddress()
Gets the IP subnet address.
|
java.lang.String |
toString() |
static InterfaceIpAddress |
valueOf(java.lang.String value)
Converts a CIDR string literal to an interface IP address.
|
public InterfaceIpAddress(InterfaceIpAddress other)
other
- the object to copy frompublic InterfaceIpAddress(IpAddress ipAddress, IpPrefix subnetAddress)
ipAddress
- the IP addresssubnetAddress
- the IP subnet addresspublic InterfaceIpAddress(IpAddress ipAddress, IpPrefix subnetAddress, IpAddress broadcastAddress)
ipAddress
- the IP addresssubnetAddress
- the IP subnet addressbroadcastAddress
- the IP broadcast address. It can be used
to specify non-default broadcast addresspublic InterfaceIpAddress(IpAddress ipAddress, IpPrefix subnetAddress, IpAddress broadcastAddress, IpAddress peerAddress)
ipAddress
- the IP addresssubnetAddress
- the IP subnet addressbroadcastAddress
- the IP broadcast address. It can be used
to specify non-default broadcast address. It should be null for
point-to-point interfaces with a peer addresspeerAddress
- the peer IP address for point-to-point interfacespublic IpAddress ipAddress()
public IpPrefix subnetAddress()
public IpAddress broadcastAddress()
public IpAddress peerAddress()
public static InterfaceIpAddress valueOf(java.lang.String value)
value
- an IP address value in string formjava.lang.IllegalArgumentException
- if the argument is invalidpublic static IpAddress computeBroadcastAddress(IpAddress ipAddress, IpPrefix subnetAddress)
ipAddress
- base IP addresssubnetAddress
- subnet specificationpublic boolean equals(java.lang.Object other)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object