class PeerGroup implements TransactionBroadcaster {

    public ListenableFuture<List<Peer>> waitForPeersOfVersion(final int numPeers, final long protocolVersion) {
        List<Peer> foundPeers = findPeersOfAtLeastVersion(protocolVersion);
        if (foundPeers.size() >= numPeers) {
            return Futures.immediateFuture(foundPeers);
        }
        final SettableFuture<List<Peer>> future = SettableFuture.create();
        addConnectedEventListener(new PeerConnectedEventListener() {
            @Override
            public void onPeerConnected(Peer peer, int peerCount) {
                final List<Peer> peers = findPeersOfAtLeastVersion(protocolVersion);
                if (peers.size() >= numPeers) {
                    future.set(peers);
                    removeConnectedEventListener(this);
                }
            }
        });
        return future;
    }

    public  PeerGroup(NetworkParameters params);
    public  PeerGroup(Context context);
    public  PeerGroup(NetworkParameters params, @Nullable AbstractBlockChain chain);
    public  PeerGroup(Context context, @Nullable AbstractBlockChain chain);
    public  PeerGroup(NetworkParameters params, @Nullable AbstractBlockChain chain, ClientConnectionManager connectionManager);
    private  PeerGroup(Context context, @Nullable AbstractBlockChain chain, ClientConnectionManager connectionManager);

}