Interface Versioned<T>
-
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public interface Versioned<T>A container for a model instance and a version. Can be used with theModeledFramework.versioned()APIs
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description static <T> Versioned<T>from(T model, int version)Return a new Versioned wrapper for the given model and versionTmodel()Returns the contained modeldefault intversion()Returns the version of the model when it was read
-
-
-
Method Detail
-
model
T model()
Returns the contained model- Returns:
- model
-
version
default int version()
Returns the version of the model when it was read- Returns:
- version
-
from
static <T> Versioned<T> from(T model, int version)
Return a new Versioned wrapper for the given model and version- Parameters:
model- modelversion- version- Returns:
- new Versioned wrapper
-
-