Class MapFlag<K,V>
java.lang.Object
com.sk89q.worldguard.protection.flags.Flag<Map<K,V>>
com.sk89q.worldguard.protection.flags.MapFlag<K,V>
Stores a key value map of typed
Flag
s.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the flag that is stored as the key flag type.Get the flag type that is stored as values.Convert the value stored for this flag into a type that can be serialized into YAML.parseInput
(FlagContext context) Parse a given input to coerce it to a type compatible with the flag.Convert a raw type that was loaded (from a YAML file, for example) into the type that this flag uses.Methods inherited from class com.sk89q.worldguard.protection.flags.Flag
chooseValue, getDefault, getName, getRegionGroupFlag, hasConflictStrategy, implicitlySetWithMembership, isValidName, requiresSubject, toString, usesMembershipAsDefault
-
Constructor Details
-
MapFlag
-
MapFlag
-
-
Method Details
-
getKeyFlag
Get the flag that is stored as the key flag type.- Returns:
- The key flag type.
-
getValueFlag
Get the flag type that is stored as values.- Returns:
- The value flag type.
-
parseInput
Description copied from class:Flag
Parse a given input to coerce it to a type compatible with the flag.- Specified by:
parseInput
in classFlag<Map<K,
V>> - Parameters:
context
- theFlagContext
- Returns:
- The coerced type
- Throws:
InvalidFlagFormat
- Raised if the input is invalid
-
unmarshal
Description copied from class:Flag
Convert a raw type that was loaded (from a YAML file, for example) into the type that this flag uses. -
marshal
Description copied from class:Flag
Convert the value stored for this flag into a type that can be serialized into YAML.
-