本文整理汇总了Java中jason.environment.Environment类的典型用法代码示例。如果您正苦于以下问题:Java Environment类的具体用法?Java Environment怎么用?Java Environment使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Environment类属于jason.environment包,在下文中一共展示了Environment类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: CentralisedEnvironment
import jason.environment.Environment; //导入依赖的package包/类
public CentralisedEnvironment(ClassParameters userEnvArgs, RunCentralisedMAS masRunner) throws JasonException {
this.masRunner = masRunner;
if (userEnvArgs != null) {
try {
userEnv = (Environment) getClass().getClassLoader().loadClass(userEnvArgs.getClassName()).newInstance();
userEnv.setEnvironmentInfraTier(this);
userEnv.init(userEnvArgs.getParametersArray());
} catch (Exception e) {
logger.log(Level.SEVERE,"Error in Centralised MAS environment creation",e);
throw new JasonException("The user environment class instantiation '"+userEnvArgs+"' has failed!"+e.getMessage());
}
}
}
开发者ID:nickrfer,项目名称:code-sentinel,代码行数:14,代码来源:CentralisedEnvironment.java
示例2: CentralisedEnvironment
import jason.environment.Environment; //导入依赖的package包/类
public CentralisedEnvironment(ClassParameters userEnvArgs, BaseCentralisedMAS masRunner) throws JasonException {
this.masRunner = masRunner;
if (userEnvArgs != null) {
try {
userEnv = (Environment) getClass().getClassLoader().loadClass(userEnvArgs.getClassName()).newInstance();
userEnv.setEnvironmentInfraTier(this);
userEnv.init(userEnvArgs.getParametersArray());
} catch (Exception e) {
logger.log(Level.SEVERE,"Error in Centralised MAS environment creation",e);
throw new JasonException("The user environment class instantiation '"+userEnvArgs+"' has failed!"+e.getMessage());
}
}
}
开发者ID:jason-lang,项目名称:jason,代码行数:14,代码来源:CentralisedEnvironment.java
示例3: setEnv
import jason.environment.Environment; //导入依赖的package包/类
public void setEnv(Environment env) {
try {
CentralisedEnvironment infraEnv = new CentralisedEnvironment(null, BaseCentralisedMAS.getRunner());
infraEnv.setUserEnvironment(env);
env.setEnvironmentInfraTier(infraEnv);
setEnvInfraTier(infraEnv);
} catch (JasonException e) {
e.printStackTrace();
}
}
开发者ID:jason-lang,项目名称:jason,代码行数:11,代码来源:TestArch.java
示例4: setUserEnvironment
import jason.environment.Environment; //导入依赖的package包/类
public void setUserEnvironment(Environment env) {
userEnv = env;
}
开发者ID:nickrfer,项目名称:code-sentinel,代码行数:4,代码来源:CentralisedEnvironment.java
示例5: getUserEnvironment
import jason.environment.Environment; //导入依赖的package包/类
public Environment getUserEnvironment() {
return userEnv;
}
开发者ID:nickrfer,项目名称:code-sentinel,代码行数:4,代码来源:CentralisedEnvironment.java
注:本文中的jason.environment.Environment类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论