Interface ConfigurationTransformation.Versioned
- All Superinterfaces:
ConfigurationTransformation
- All Known Implementing Classes:
DataFixerTransformation,DataFixerTransformation
- Enclosing interface:
- ConfigurationTransformation
A transformation that is aware of node versions.
- Since:
- 4.0.0
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.spongepowered.configurate.transformation.ConfigurationTransformation
ConfigurationTransformation.Builder, ConfigurationTransformation.Versioned, ConfigurationTransformation.VersionedBuilder -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intIndicates a node with an unknown version.Fields inherited from interface org.spongepowered.configurate.transformation.ConfigurationTransformation
WILDCARD_OBJECT -
Method Summary
Modifier and TypeMethodDescriptionintGet the latest version that nodes can be updated to.default intversion(ConfigurationNode node) Get the version of a node hierarchy.Get the path the node's current version is located at.Methods inherited from interface org.spongepowered.configurate.transformation.ConfigurationTransformation
apply
-
Field Details
-
VERSION_UNKNOWN
Indicates a node with an unknown version.This can be returned as the latest version.
- Since:
- 4.0.0
- See Also:
-
-
Method Details
-
versionKey
Get the path the node's current version is located at.- Returns:
- version path
- Since:
- 4.0.0
-
latestVersion
int latestVersion()Get the latest version that nodes can be updated to.- Returns:
- the most recent version
- Since:
- 4.0.0
-
version
Get the version of a node hierarchy.Note that the node checked here must be the same node passed to
ConfigurationTransformation.apply(ConfigurationNode), not any node in a hierarchy.If the node value is not present or not coercible to an integer,
VERSION_UNKNOWNwill be returned. When the transformation is executed, every version transformation will be applied.- Parameters:
node- node to check- Returns:
- version, or
VERSION_UNKNOWNif no value is present - Since:
- 4.0.0
-