@hideki
Basic question: The setters of MutableDocument return the same MutableDocument instance.
Why is this? After all, when calling any method on an object (in this case MutableDocument) you already have a handle on the instance. If I understand the doc correctly, exactly the same instance is returned. What is the purpose of this?
Thanks
nat
Hi @natgross
CBL 2.0 supports fluent API.
By returning itself, the developer can write following way.
MutableDocument doc = new MutableDocument("doc1")
.setInt("int", 1)
.setString("str", "hello world")
.setDictionary("dict", new MutableDictionary().setDouble("double", 0.0f));
Yes!
Now that explains quite a few other things as well.
Thanks.