public final class LocalAddress extends java.net.SocketAddress implements java.lang.Comparable<LocalAddress>
"ephemeral".
"ephemeral", but they are not equal to each other.| Modifier and Type | Field and Description |
|---|---|
private boolean |
ephemeral |
static java.lang.String |
EPHEMERAL |
private java.lang.String |
id |
private static long |
serialVersionUID |
| Constructor and Description |
|---|
LocalAddress(int id)
Creates a new instance with the specified ID.
|
LocalAddress(java.lang.String id)
Creates a new instance with the specified ID.
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(LocalAddress o) |
boolean |
equals(java.lang.Object o) |
java.lang.String |
getId()
Returns the ID of this address.
|
int |
hashCode() |
boolean |
isEphemeral()
Returns
true if and only if this address is ephemeral. |
java.lang.String |
toString() |
private static final long serialVersionUID
public static final java.lang.String EPHEMERAL
private final java.lang.String id
private final boolean ephemeral
public LocalAddress(int id)
public LocalAddress(java.lang.String id)
public java.lang.String getId()
public boolean isEphemeral()
true if and only if this address is ephemeral.public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int compareTo(LocalAddress o)
compareTo in interface java.lang.Comparable<LocalAddress>public java.lang.String toString()
toString in class java.lang.Object