- All Known Subinterfaces:
UserDataHolderEx
- All Known Implementing Classes:
UserDataHolderBase
public interface UserDataHolder
Allows storing custom user data within a model object. This might be preferred to an explicit Map with model objects as keys and
custom data in values because this allows the data to be garbage-collected together with the values.
If you need to implement this interface, extend UserDataHolderBase or delegate to its instance instead of writing your own implementation.
-
Method Summary
Modifier and TypeMethodDescription<T> TgetUserData(@NotNull Key<T> key) <T> voidputUserData(@NotNull Key<T> key, T value) Add a new user data value to this object.
-
Method Details
-
getUserData
- Returns:
- a user data value associated with this object. Doesn't require read action.
-
putUserData
Add a new user data value to this object. Doesn't require write action.
-