本文整理汇总了Java中org.cpsolver.ifs.assignment.Assignment.clearContext方法的典型用法代码示例。如果您正苦于以下问题:Java Assignment.clearContext方法的具体用法?Java Assignment.clearContext怎么用?Java Assignment.clearContext使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.cpsolver.ifs.assignment.Assignment
的用法示例。
在下文中一共展示了Assignment.clearContext方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createAssignmentContexts
import org.cpsolver.ifs.assignment.Assignment; //导入方法依赖的package包/类
/**
* Create all assignment contexts for the given assignment
* @param assignment given {@link Assignment}
* @param clear if true {@link Assignment#clearContext(AssignmentContextReference)} is called first
*/
public synchronized void createAssignmentContexts(Assignment<V, T> assignment, boolean clear) {
for (AssignmentContextReference<V,T,? extends AssignmentContext> ref: iAssignmentContextReferences.values()) {
if (clear) assignment.clearContext(ref);
assignment.getAssignmentContext(ref);
}
}
示例2: clearAssignmentContexts
import org.cpsolver.ifs.assignment.Assignment; //导入方法依赖的package包/类
/**
* Clear all assignment contexts for the given assignment
* @param assignment given {@link Assignment}
*/
public synchronized void clearAssignmentContexts(Assignment<V, T> assignment) {
for (AssignmentContextReference<V,T,? extends AssignmentContext> ref: iAssignmentContextReferences.values())
assignment.clearContext(ref);
}