Package com.isode.dsapi.syntax
Class TelexData
java.lang.Object
com.isode.dsapi.syntax.TelexData
- All Implemented Interfaces:
Comparable<TelexData>
This class stores information about a network address in the TELEX format.
This is an immutable class.
Examples:
127.0.0.1
127.0.0.1+19000
localhost+19000
- Since:
- 15.0
- Author:
- mv
-
Constructor Summary
ConstructorsConstructorDescriptionConstructor to create an object which is a copy of the given object but replaces the host name with the given host name.Constructor to create an object with the given data.Constructor to create an object with the given data. -
Method Summary
-
Constructor Details
-
TelexData
Constructor to create an object with the given data.- Parameters:
host
- Host name.port
- Port.- Throws:
BadValueException
- if any of the input is invalid.
-
TelexData
Constructor to create an object with the given data.- Parameters:
str
- String representation of a TELEX data.- Throws:
BadValueException
- if the input is invalid.
-
TelexData
Constructor to create an object which is a copy of the given object but replaces the host name with the given host name.- Parameters:
telexDataToCopy
- object to copy, must not be nullhostName
- Host name, must not be null- Throws:
BadValueException
- if any of the input is invalid.
-
-
Method Details
-
toString
-
getHost
Returns the host name of the TELEX data object.- Returns:
- Host name of the TELEX data.
-
getPort
public int getPort()Returns the port of the TELEX data object.- Returns:
- Port of the TELEX data.
-
getCanonicalForm
The host is converted to lower case.- Returns:
- canonical form of object.
-
equals
-
hashCode
public int hashCode() -
compareTo
- Specified by:
compareTo
in interfaceComparable<TelexData>
-