Package septogeddon.pluginquery.api
Interface QueryMetadata
- All Known Implementing Classes:
QueryMetadataImpl
public interface QueryMetadata
Handle non-persistent metadata
- Author:
- Thito Yalasatria Sunarya
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addParent
(QueryMetadata metadata) Add parent for further lookup<T> boolean
containsData
(QueryMetadataKey<T> key) Check if this storage contains wanted data, does not check the parent<T> T
getData
(QueryMetadataKey<T> key) Get data from this storage and parent storage<T> T
getData
(QueryMetadataKey<T> key, T defaultValue) Get data from this storage and parent storage, will use defaultValue if its nullvoid
removeParent
(QueryMetadata metadata) Remove parent<T> void
setData
(QueryMetadataKey<T> key, T value) Set data to current storage, will remove if its null, does not affect the parent metadata
-
Method Details
-
addParent
Add parent for further lookup- Parameters:
metadata
-
-
removeParent
Remove parent- Parameters:
metadata
-
-
getData
Get data from this storage and parent storage- Type Parameters:
T
-- Parameters:
key
-- Returns:
-
getData
Get data from this storage and parent storage, will use defaultValue if its null- Type Parameters:
T
-- Parameters:
key
-defaultValue
-- Returns:
-
setData
Set data to current storage, will remove if its null, does not affect the parent metadata- Type Parameters:
T
-- Parameters:
key
-value
-
-
containsData
Check if this storage contains wanted data, does not check the parent- Parameters:
key
-- Returns:
-