Skip to content

Commit

Permalink
twosigma#5798 Use Any instead of AnyVal in Text, Rasters, and Constan…
Browse files Browse the repository at this point in the history
…tLine
  • Loading branch information
jpallas committed Aug 29, 2017
1 parent 2a623d8 commit 0a8b467
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,23 +20,23 @@ import com.twosigma.beakerx.chart.xychart.plotitem.StrokeType

class ConstantLine extends com.twosigma.beakerx.chart.xychart.plotitem.ConstantLine {

def this(x: AnyVal) {
def this(x: Any) {
this()
super.setX(x.asInstanceOf[Number])
}

def this(x: AnyVal, y: AnyVal) {
def this(x: Any, y: Any) {
this(x)
super.setY(y.asInstanceOf[Number])
}

def this(x: AnyVal, y: AnyVal, style: StrokeType, color: Color) {
def this(x: Any, y: Any, style: StrokeType, color: Color) {
this(x, y)
super.setStyle(style)
super.setColor(color)
}

def this(x: AnyVal, y: AnyVal, color: Color, width: Float, showLabel: Boolean) {
def this(x: Any, y: Any, color: Color, width: Float, showLabel: Boolean) {
this(x, y)
super.setColor(color)
super.setWidth(width)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,24 +18,24 @@ package com.twosigma.beakerx.scala.chart.xychart.plotitem

import scala.collection.JavaConverters._

class Rasters(y: Seq[AnyVal], height: Seq[AnyVal], width: Seq[AnyVal]) extends com.twosigma.beakerx.chart.xychart.plotitem.Rasters {
class Rasters(y: Seq[Any], height: Seq[Any], width: Seq[Any]) extends com.twosigma.beakerx.chart.xychart.plotitem.Rasters {

super.setY(y.map(x => x.asInstanceOf[Number]).asJava)
super.setHeight(height.map(x => x.asInstanceOf[Number]).asJava)
super.setWidth(width.map(x => x.asInstanceOf[Number]).asJava)

def this(x: Seq[AnyVal], y: Seq[AnyVal], height: Seq[AnyVal], width: Seq[AnyVal], opacity: Seq[AnyVal]) {
def this(x: Seq[Any], y: Seq[Any], height: Seq[Any], width: Seq[Any], opacity: Seq[Any]) {
this(y, height, width)
super.setX(x.map(x => x.asInstanceOf[AnyRef]).asJava)
super.setOpacity(opacity.map(x => x.asInstanceOf[Number]).asJava)
}

def this(x: Seq[AnyVal], y: Seq[AnyVal], height: Seq[AnyVal], width: Seq[AnyVal], opacity: Seq[AnyVal], dataString: Array[Byte]) {
def this(x: Seq[Any], y: Seq[Any], height: Seq[Any], width: Seq[Any], opacity: Seq[Any], dataString: Array[Byte]) {
this(x, y, height, width, opacity)
super.setDataString(dataString)
}

def this(x: Seq[AnyVal], y: Seq[AnyVal], height: Seq[AnyVal], width: Seq[AnyVal], opacity: Seq[AnyVal], fileUrl: String) {
def this(x: Seq[Any], y: Seq[Any], height: Seq[Any], width: Seq[Any], opacity: Seq[Any], fileUrl: String) {
this(x, y, height, width, opacity)
super.setFileUrl(fileUrl)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ package com.twosigma.beakerx.scala.chart.xychart.plotitem

class Text extends com.twosigma.beakerx.chart.xychart.plotitem.Text {

def this(x: AnyVal, y: AnyVal, text: String, pointerAngle: Double) {
def this(x: Any, y: Any, text: String, pointerAngle: Double) {
this()
super.setX(x.asInstanceOf[Number])
super.setY(y.asInstanceOf[Number])
Expand Down

0 comments on commit 0a8b467

Please sign in to comment.