com.atlassian.crowd.model.application
Class RemoteAddress
java.lang.Object
com.atlassian.crowd.model.application.RemoteAddress
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Comparable<RemoteAddress>
public class RemoteAddress
- extends java.lang.Object
- implements java.io.Serializable, java.lang.Comparable<RemoteAddress>
Represents a valid IP address (IPv4, IPv6) or hostname for an Application
- See Also:
- Serialized Form
|
Constructor Summary |
RemoteAddress(java.lang.String address)
Generates a RemoteAddress based on the value provided |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
RemoteAddress
public RemoteAddress(java.lang.String address)
- Generates a RemoteAddress based on the value provided
- Parameters:
address - can be either a hostname or IP address (IPv4 or IPv6)
An IPv4, IPv6 address can also have a mask defined in CIDR format
Any input that is not recognised as IPv4 or IPv6 format will be treated as a hostname.
getAddress
public java.lang.String getAddress()
getAddressBytes
public byte[] getAddressBytes()
isHostName
public boolean isHostName()
getMask
public int getMask()
getEncodedAddressBytes
public java.lang.String getEncodedAddressBytes()
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals in class java.lang.Object
hashCode
public int hashCode()
- Overrides:
hashCode in class java.lang.Object
compareTo
public int compareTo(RemoteAddress o)
- Specified by:
compareTo in interface java.lang.Comparable<RemoteAddress>
Copyright © 2010 Atlassian. All Rights Reserved.