Interface IAdaptableModel

All Superinterfaces:
AutoCloseable, IModel
All Known Implementing Classes:
HutnModel, ModelReference, ReflectiveModelReference

public interface IAdaptableModel extends IModel
Interface for models which can be adapted to a different model type, if required. Mostly useful for adapting model types which do not implement comparison to those who do.
  • Method Details

    • adaptTo

      <T> T adaptTo(Class<T> modelType)
      Tries to adapt the model to a different type. If it is not possible, this method should return null.
      Parameters:
      modelType - Type to which this model should be adapted.
      Returns:
      Non-null value if the model could be adapted, null otherwise.