我有List<BooleanProperty>
,如何将它们与or
合并?
我需要类似的东西:
private BooleanProperty getMergedProperty(List<BooleanProperty> properties){
return mergeAllWithOr(properties);
}
或者:
private BooleanBinding getMergedBinding(List<BooleanProperty> properties){
return mergeAllWithOr(properties);
}
mergeAllWithOr
表示list.get(0).or(list.get(1)).or(...
修改
这是我尝试过的,但它可以作为and
而不是或:
private BooleanProperty getMergedProperty(List<BooleanProperty> properties) {
BooleanProperty property = new SimpleBooleanProperty();
properties.forEach(property::bind); // or donesn't work at all.
return property;
}
你能建议任何解决方案吗?