Package space.arim.dazzleconf.migration
Interface MigrateSource.Filter<C_OLD>
- Type Parameters:
C_OLD- the old configuration type
- Enclosing interface:
MigrateSource<C>
public static interface MigrateSource.Filter<C_OLD>
A filter for old configuration versions.
Instances of this type can be applied by using MigrateSource.addFilter(Filter).
Normally, a MigrateSource is responsible for detecting the validity of an old version. Still, this type
exists to make the API more usable, so that callers don't have to re-implement MigrateSource themselves.
-
Method Summary
-
Method Details
-
isUsable
Checks whether the given old configuration should be used.This method is called after the original
MigrateSource.load(MigrateContext)to filter the value coming from it. If it returns false, theTransitionwill not be invoked.- Parameters:
oldConfig- the old configuration- Returns:
- true if usable
-