From 120bfab03e58a96aa52d366cadcfaded823a42df Mon Sep 17 00:00:00 2001 From: Leo Galambos Date: Thu, 3 Jul 2025 22:53:48 +0200 Subject: [PATCH] Add FAQ --- FAQ.md | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 FAQ.md diff --git a/FAQ.md b/FAQ.md new file mode 100644 index 0000000..74f8e9f --- /dev/null +++ b/FAQ.md @@ -0,0 +1,29 @@ +# FAQ + +## What happens if I store a null value? + +Null values are stored normally. Listeners will be notified if the null differs from the previous value. + +## Can a listener remove itself? + +Yes, a listener can call `Ctx.INSTANCE.removeListener(...)` on itself if needed. + +## What if a listener throws an exception? + +Exceptions thrown in one listener will not stop other listeners from being notified, but you should handle exceptions inside the listener code. + +## Can I use primitive types? + +Yes, via their boxed equivalents, e.g. `Integer`, `Double`, etc. + +## How about arrays? + +Yes, arrays are supported and compared using `Objects.deepEquals`. + +## How to test with mocks? + +Use a mock of the `Listener` interface. The key-based typing makes it easy to isolate in unit tests. + +--- + +[[Home]] | [[API Reference]] | [[Programming Guide]] \ No newline at end of file