Update Home
6
Home.md
6
Home.md
@@ -9,6 +9,7 @@
|
||||
- Change notifications via weakly-referenced listeners
|
||||
- Thread-safe and simple to use
|
||||
- Singleton style with enum
|
||||
- **Multiple independent named contexts** for modular, isolated data storage
|
||||
|
||||
## Quick Link
|
||||
|
||||
@@ -23,6 +24,11 @@
|
||||
```java
|
||||
Key<Integer> counterKey = Key.of("counter", Integer.class);
|
||||
Ctx.INSTANCE.put(counterKey, 42);
|
||||
|
||||
// Working with multiple named contexts
|
||||
CtxInterface orderCtx = Ctx.INSTANCE.getContext("order");
|
||||
Key<String> orderIdKey = Key.of("orderId", String.class);
|
||||
orderCtx.put(orderIdKey, "ORD123");
|
||||
````
|
||||
|
||||
Enjoy consistent, simple context management!
|
||||
Reference in New Issue
Block a user