Class ConfigurationTransformation.VersionedBuilder
java.lang.Object
org.spongepowered.configurate.transformation.ConfigurationTransformation.VersionedBuilder
- Enclosing interface:
- ConfigurationTransformation
Builds a versioned 
ConfigurationTransformation.- Since:
- 4.0.0
- 
Method SummaryModifier and TypeMethodDescriptionaddVersion(int version, @NonNull ConfigurationTransformation transformation) Adds a transformation to this builder for the given version.addVersion(int version, @NonNull ConfigurationTransformation... transformations) Adds a new series of transformations for a version.build()Builds the transformation.makeVersion(int version, @NonNull Consumer<? super ConfigurationTransformation.Builder> maker) Create and add a new transformation to this builder.versionKey(Object... versionKey) Sets the path of the version key within the configuration.
- 
Method Details- 
versionKeySets the path of the version key within the configuration.- Parameters:
- versionKey- the path to the version key
- Returns:
- this builder (for chaining)
- Since:
- 4.0.0
 
- 
addVersionpublic @NonNull ConfigurationTransformation.VersionedBuilder addVersion(int version, @NonNull ConfigurationTransformation transformation) Adds a transformation to this builder for the given version.The version must be between 0 and Integer.MAX_VALUE, and a version cannot be specified multiple times.- Parameters:
- version- the version
- transformation- the transformation
- Returns:
- this builder (for chaining)
- Since:
- 4.0.0
 
- 
addVersionpublic @NonNull ConfigurationTransformation.VersionedBuilder addVersion(int version, @NonNull ConfigurationTransformation... transformations) Adds a new series of transformations for a version.The version must be between 0 and Integer.MAX_VALUE.- Parameters:
- version- the version
- transformations- the transformations. To perform a version upgrade, these transformations will be executed in order.
- Returns:
- this builder
- Since:
- 4.0.0
 
- 
makeVersionpublic @NonNull ConfigurationTransformation.VersionedBuilder makeVersion(int version, @NonNull Consumer<? super ConfigurationTransformation.Builder> maker) Create and add a new transformation to this builder.The transformation will be created from the builder passed to the callback function The version must be between 0 and Integer.MAX_VALUE- Parameters:
- version- the version
- maker- the transformation
- Returns:
- this builder
- Since:
- 4.0.0
 
- 
buildBuilds the transformation.- Returns:
- the transformation
- Since:
- 4.0.0
 
 
-