Code example for Set

Methods: isEmpty

0
        stopping = true;
        maybeStop(); 
    } 
 
    private void maybeStop() { 
        if (connections.isEmpty()) {
            outgoingQueue.discardQueued();
            incomingQueue.queue(new EndOfStream());
        } 
    } 
}