Package org.spongepowered.api.util
Interface Updater<C>
-
- Type Parameters:
C
- The type of object being updated
- All Known Subinterfaces:
DataContentUpdater
public interface Updater<C>
An updater that will take atype
and update it across different versions. Whether this is applicable to serialization or object management is not required.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description int
inputVersion()
Gets the numericalversion
that thisUpdater
can accept.int
outputVersion()
The outputtedversion
that thisUpdater
will output to.C
update(C content)
Attempts to update the content ofC
as long as the content version itself has been abided by.
-
-
-
Method Detail
-
inputVersion
int inputVersion()
Gets the numericalversion
that thisUpdater
can accept.- Returns:
- The numerical input version
-
outputVersion
int outputVersion()
The outputtedversion
that thisUpdater
will output to. Note that it is possible multiple updaters are able to cross between different versions.- Returns:
- The numerical output version
-
-