我正在尝试 ping 并将 ping 摘要列在 Matcher.group(0) 中。显示的 ping 汇总结果为:
Matcher.group(0)
time=35ms
time=3ms
time=2ms
time=3ms
time=2ms
time=83ms
time=3ms
time=69ms
time=2ms
time=5ms
java.io.IOException: The pipe is being closed
BUILD SUCCESSFUL (total time: 9 seconds)
我可以/我如何比较这些结果?我的意思是,我可以这样做:
if(m.group(0) >= "time=66ms") {
//do something
} else if (m.group(0) < "time=66ms") {
//do something
}
需要一些提示和指导,谢谢先进^^"