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 the ModeledFramework.versioned() APIs
  • Method Summary

    Modifier and Type
    Method
    Description
    static <T> Versioned<T>
    from(T model, int version)
    Return a new Versioned wrapper for the given model and version
    Returns the contained model
    default int
    Returns the version of the model when it was read
  • Method Details

    • 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 - model
      version - version
      Returns:
      new Versioned wrapper