Skip to content

Instantly share code, notes, and snippets.

@vovahost
Created November 10, 2020 23:58
Show Gist options
  • Save vovahost/db4f601611879aa657403ff277324130 to your computer and use it in GitHub Desktop.
Save vovahost/db4f601611879aa657403ff277324130 to your computer and use it in GitHub Desktop.
Java Dimension2D with constructor with double parameters
import java.awt.geom.Dimension2D
data class DimensionDouble(private var width: Double, private var height: Double) : Dimension2D() {
override fun getWidth(): Double {
return width
}
override fun getHeight(): Double {
return height
}
override fun setSize(width: Double, height: Double) {
this.width = width
this.height = height
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment