JungleConfig exposes several methods for listing, inspecting, and filtering stored entries without reading and deserializing every value individually. You can check whether a specific key is present, enumerate all keys in the store, retrieve the stored type tag for any entry, run a multi-axis regex query across keys, types, and raw values, or delete entries — all without knowing the contents of the config file in advance.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/himansaBro/JungleConfig/llms.txt
Use this file to discover all available pages before exploring further.
Checking key existence
Exists(String key) returns true if the key is present in the current view of the store (accounting for any pending transaction state) and false otherwise. It does not deserialize the stored value.
Listing all keys
getAllKeys() returns a List<String> of every key currently in the store, in insertion order. The overload getAllKeys(String regx) filters that list by a Java regex and returns only the matching keys.
Set appear in the result even before a Commit, and keys queued by Remove are excluded.
Inspecting stored types
Every entry in JungleConfig is stored with an explicit type tag that identifies which adapter was used to serialize it.getTypeSimpleName(String key) returns that tag as a String (for example, "String", "Integer", "Boolean", "Json"). GetTypeSimpleName(String key) returns the result wrapped in an Optional<String> using Optional.of(...).
getTypeSimpleName on a key that does not exist returns null.
Advanced querying with query()
query lets you filter all stored entries in one call using six parameters that form three independent match conditions — one for the key, one for the type tag, and one for the raw stored value. Each condition is a (boolean invert, String regex) pair.
(invertFlag XOR key.matches(regex)) evaluates to true. All three conditions must be satisfied simultaneously for an entry to appear in the result.
iKey | keyReg | iKey XOR matches(keyReg) | Effect |
|---|---|---|---|
false | ".+" | false XOR true = true | All keys included |
true | ".+" | true XOR true = false | No keys included |
false | "app\\..+" | false XOR true = true (only if key matches) | Includes only keys starting with app. |
true | "app\\..+" | true XOR true = false (for matching keys) | Excludes keys starting with app. |
iType/typeReg and iVal/valReg. All three conditions must be true together.
The method returns a TypeMap<String, String, String> where each entry holds the key, the type tag, and the raw stored value string.
entry.getKey() is the config key, entry.getValue1() is the type tag, and entry.getValue2() is the raw stored string before deserialization.
Removing entries
Remove(String key) deletes a single entry and returns true if the key existed, or false if it was not present. RemoveAllKeys() clears every entry in the store in one operation. Both methods respect the current transaction mode — in manual mode the removals are buffered until Commit or EndTransaction.
getAllKeys(String regx) is implemented with String.matches(), which requires the entire key string to match the regex — not just a substring. This means you must use a pattern that covers the whole key. For example, "user\\..+" matches any key that starts with user. followed by one or more characters. A pattern like "user\\." would only match the six-character string user. exactly and would never match real keys such as user.name. When in doubt, use anchored patterns ("user\\..+") or prefix with ".*" to allow leading content.