Created
May 10, 2018 15:56
-
-
Save sellmair/e98c726c6d0b66f844ade2f6167c538c to your computer and use it in GitHub Desktop.
Phantom Types in Kotlin: Modelling a Pipeline RequestExtensions
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
val Request<out ReadRawImage>.image get() = Request.imageOf(this) | |
val Request<out ReadTimestamp>.timestamp get() = Request.timestampOf(this) | |
val Request<out ReadMeasureSettings>.measureSettings get() = Request.measureSettingsOf(this) | |
val Request<out ReadPreparedImage>.image get() = Request.preparedImageOf(this) | |
val Request<out ReadPreparedImage>.scaledImage get() = Request.scaledPreparedImageOf(this) | |
val Request<out ReadShapes>.shapes get() = Request.shapesOf(this) | |
val Request<out ReadFeatures>.features get() = Request.featuresOf(this) | |
val Request<out ReadPeople>.people get() = Request.peopleOf(this) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment