Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在 Java 中,我们可以这样做:
ObservableStringValue str = ...; Binding<Integer> strLen = EasyBind.map(str, String::length);
在哪里String::length有效地将实例方法用作函数。Scala中是否有等效的形式?(并且通过扩展,在 Scala 中使用 EasyBind 的等效方法)
String::length
scala> "dsfs".toString _ res1: () => String = <function0>