如何访问固定 threadExecutor 中的 getOptimizedMol() 方法?当每个优化器线程完成时,我需要获得返回分子吗?
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;
}
}