javafx - 如何更改对象属性到双装订
问题描述
如何将 ObjectProperty 更改为 DoubleBinding 然后放入 Bindings.createObjectBinding();
private transient ObjectProperty<BigDecimal> buy;
private transient ObjectProperty<BigDecimal> sell;
有以下错误:
buy = Bindings.createObjectBinding(() -> (operation.get() == Operation.BUY) ? volume.get() : 0, volume, operation);
sell = Bindings.createDoubleBinding(() -> (operation.get() == Operation.SELL) ? volume.get() : 0, volume, operation);
解决方案
推荐阅读
- jquery - 查询所有元素的字段值相同的子文档数组
- nltk - WordNetLemmatizer 不在文本数据中进行词形还原
- reactjs - Feathers:为两个不同的查询自定义 find()
- css - 防止悬停在绝对定位的孩子上传播给父母
- pdf - 如何使用 Ghostscript 为旧版 Kindle 预处理 pdf?
- java - 如何一一获取arraylist值并将其放入stringbuilder java中?
- tensorflow - 相同的代码在不同版本的 tensorflow 上运行,但分配了不同的 gpu 内存
- c# - 简单 for 循环中的索引越界异常:索引变量超出数组长度,原因不明
- sql - 存储过程中的 SQL 查询基于少量计算从另一个表更新一个表?
- mysql - 在 MySQL 中连接 4 个表后没有得到正确的结果