Methods Summary |
---|
public java.net.SocketAddress | address()Gets the address of this {@code Proxy} instance.
return address;
|
public final boolean | equals(java.lang.Object obj)Compares the specified {@code obj} to this {@code Proxy} instance and
returns whether they are equal or not. The given object must be an
instance of {@code Proxy} with the same address and the same type value
to be equal.
if (this == obj) {
return true;
}
if (!(obj instanceof Proxy)) {
return false;
}
Proxy another = (Proxy) obj;
// address is null when and only when it's NO_PROXY.
return (type == another.type) && address.equals(another.address);
|
public final int | hashCode()Gets the hashcode for this {@code Proxy} instance.
int ret = 0;
ret += type.hashCode();
if (null != address) {
ret += address.hashCode();
}
return ret;
|
public java.lang.String | toString()Gets a textual representation of this {@code Proxy} instance. The string
includes the two parts {@code type.toString()} and {@code
address.toString()} if {@code address} is not {@code null}.
String proxyString = String.valueOf(type);
if (null != address) {
proxyString += "/" + address.toString(); //$NON-NLS-1$
}
return proxyString;
|
public java.net.Proxy$Type | type()Gets the type of this {@code Proxy} instance.
return type;
|