Added a convenience constructor to LocalAddress

This commit is contained in:
Trustin Lee 2009-02-13 06:53:22 +00:00
parent 395fcbbd29
commit e8665ea867

View File

@ -38,6 +38,10 @@ public final class LocalAddress extends SocketAddress implements Comparable<Loca
private final String id; private final String id;
private final boolean ephemeral; private final boolean ephemeral;
public LocalAddress(int id) {
this(String.valueOf(id));
}
public LocalAddress(String id) { public LocalAddress(String id) {
if (id == null) { if (id == null) {
throw new NullPointerException("id"); throw new NullPointerException("id");