Code example for HashSet

Methods: addaddAll

0
        this.peerSampler = peerSampler;
    } 
 
    @Override 
    public void update(Protocol that) {
        Set<Address> buffer = new HashSet<Address>();
        Address thisDescriptor = getAddress();
        buffer.add(thisDescriptor);
        buffer.addAll(view);
        buffer.addAll(peerSampler.getRandomPeers());
    } 
 
    public abstract Set<Address> selectView(Set<Address> buffer);
 
} 
Stop searching for code, let great code find you!  Add Codota to your java IDE