public Conditional(final Command ifTrue,final Command ifFalse) {
super("Condition?" + (ifTrue == null ? "" : ifTrue .getName()) +
":" + (ifFalse == null ? "" : ifFalse.getName()));
// Wrap the Commands to expose protected methods
if(ifTrue != null) {
_ifTrue = new PublicCommand(ifTrue);
for(Enumeration e = _ifTrue.getRequirements();e.hasMoreElements();) {
requires((Subsystem) e.nextElement());
}
} else {
_ifTrue = null;
}
if(ifFalse != null) {
_ifFalse = new PublicCommand(ifFalse);
for(Enumeration e = _ifFalse.getRequirements();e.hasMoreElements();) {
requires((Subsystem) e.nextElement());
}
} else {
_ifFalse = null;
}
}
Conditional.java 文件源码
java
阅读 24
收藏 0
点赞 0
评论 0
项目:Storm2014
作者:
评论列表
文章目录