如何在固定的threadExecutor中訪問getOptimizedMol()方法?我需要獲得返回分子作爲每個優化器線程完成?threadExecutor的返回值
import chemaxon.marvin.calculations.ConformerPlugin;
import chemaxon.marvin.plugin.PluginException;
import chemaxon.struc.Molecule;
public class Optimizer3D implements Runnable {
private Molecule mol3D;
private Molecule mol2D;
Optimizer3D(Molecule mol2D_)
{
this.mol2D = mol2D_;
}
@Override
public void run() {
mol3D = chemAxonOptimizer();
}
private Molecule chemAxonOptimizer()
{
//optimize molecule code not shown
return molecule;
}
public Molecule getOptimizedMol()
{
return mol3D;
}
}
非常感謝您! – lochi 2012-03-13 01:56:54