Code example for Set

Methods: iterator

0
    } 
 
    @Override 
    protected SocketAddress localAddress0() {
        try { 
            Iterator<SocketAddress> i = ch.getAllLocalAddresses().iterator();
            if (i.hasNext()) {
                return i.next();
            } 
        } catch (IOException e) {
            // ignore 
        } 
        return null; 
    } 
 
    @Override 
    public Set<InetSocketAddress> allLocalAddresses() {
        try { 
            final Set<SocketAddress> allLocalAddresses = ch.getAllLocalAddresses();
            final Set<InetSocketAddress> addresses = new LinkedHashSet<InetSocketAddress>(allLocalAddresses.size());
Experience pair programming with AI  Get Codota for Java