2024年Clojure调查问卷!中分享您的想法。

欢迎!有关如何使用此网站的信息,请参阅关于页面。

0
java.data
给定一个类

public class BoolTest {
    private Boolean aBoolean;
    private String aString;

    public Boolean isABoolean() {
        return aBoolean;
    }

    public void setABoolean(Boolean value) {
        this.aBoolean = value;
    }

    public String getAString() {
        return aString;
    }

    public void setAString(String aString) {
        this.aString = aString;
    }
}

测试

(def example (BoolTest.))

(defn run-test []
  (do
    (-> example
      (.setABoolean true))
    (-> example
      (.setAString "something"))
    (from-java example)))

***** 实际
(test/run-test) => {:AString "something"}

**** 预期
(test/run-test) => {:AString "something" :ABoolean true}

1 回答

0
...