Class TeamMeta
java.lang.Object
com.booksaw.betterTeams.team.meta.TeamMeta
This class manages custom metaData for a team.
It stores various properties as key-value pairs.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionRetrieves a metaData value by its key.getAll()
Returns an unmodifiable view of all metaData entries.Prepares the metadata for storage/serialization.boolean
Checks if a metaData entry with the specified key exists.void
Loads metaData from a raw map.void
Removes a metaData entry by its key.void
Adds or updates a metaData entry.
-
Constructor Details
-
TeamMeta
public TeamMeta()
-
-
Method Details
-
set
Adds or updates a metaData entry.- Parameters:
key
- The identifier for the metaData.value
- The string value of the metaData.
-
get
Retrieves a metaData value by its key.- Parameters:
key
- The key of the metaData to retrieve.- Returns:
- An Optional containing the value, or empty if not found.
-
has
Checks if a metaData entry with the specified key exists.- Parameters:
key
- The key to check.- Returns:
- True if the metaData exists, false otherwise.
-
remove
Removes a metaData entry by its key.- Parameters:
key
- The key of the metaData to remove.
-
getAll
Returns an unmodifiable view of all metaData entries.- Returns:
- An unmodifiable Map of all metaData.
-
getSerialized
Prepares the metadata for storage/serialization.- Returns:
- A new
Map<String, String>
containing all metadata in a raw, serializable format.
-
load
Loads metaData from a raw map.- Parameters:
rawMeta
- The map of raw metaData to load.
-