Last active
May 10, 2018 15:39
-
-
Save sellmair/817c5357b6ada71448bb9f9b039a595d to your computer and use it in GitHub Desktop.
Phantom Types in Kotlin: Modelling a Pipeline: Request<Stage>
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* This is our Request type. It is basically a holder for all | |
* information we could wish from it. But we cannot read anything from it directly. | |
* It has a type param T. | |
* T is not used anywhere in Request directly, hence why it is called Phantom Type. | |
*/ | |
class Request<T> ( | |
private val image: Image?, | |
private val timestamp: Timestamp?, | |
private val measureSettings: MeasureSettings?, | |
private val preparedImage: Mat?, | |
private val scaledPreparedImage: Mat?, | |
private val shapes: List<Shape>?, | |
private val features: List<Feature>?, | |
private val people: List<Person>?) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment