Existe uma maneira de argumentar em um método que pode ser chamad

Criei um código que pega um endereço IP (do método principal em outra classe) e depois percorre um intervalo de endereços IP que fazem ping em cada um deles. Eu tenho um front-end da GUI sobre isso e ele estava travando (por isso, fiz o multithreading. Meu problema é que não posso mais usar o endereço IP como argumento no meu código de ping como possível de chamar. para isso e não consigo encontrar uma maneira de contornar isso.Existe uma maneira de um método que possa chamar argumentos? Se não, existe alguma outra maneira de realizar o que estou tentando fazer?

amostra do meu código:

public class doPing implements Callable<String>{

public String call() throws Exception{

    String pingOutput = null;

    //gets IP address and places into new IP object
    InetAddress IPAddress = InetAddress.getByName(IPtoPing);
    //finds if IP is reachable or not. a timeout timer of 3000 milliseconds is set.
    //Results can vary depending on permissions so cmd method of doing this has also been added as backup
    boolean reachable = IPAddress.isReachable(1400);

    if (reachable){
          pingOutput = IPtoPing + " is reachable.\n";
    }else{
        //runs ping command once on the IP address in CMD
        Process ping = Runtime.getRuntime().exec("ping " + IPtoPing + " -n 1 -w 300");
        //reads input from command line
        BufferedReader in = new BufferedReader(new InputStreamReader(ping.getInputStream()));
        String line;
        int lineCount = 0;
        while ((line = in.readLine()) != null) {
            //increase line count to find part of command prompt output that we want
            lineCount++;
            //when line count is 3 print result
            if (lineCount == 3){
                pingOutput = "Ping to " + IPtoPing + ": " + line + "\n";
            }
        }
    }
    return pingOutput;
}
}

IPtoPing costumava ser o argumento usado.

questionAnswers(12)

yourAnswerToTheQuestion