@@ -11,7 +11,7 @@ import kotlin.Int
1111import kotlin.String
1212import kotlin.arrayOf
1313
14- open class BarDataSet (yVals : MutableList <BarEntry ?>, label : String? ) : BarLineScatterCandleBubbleDataSet<BarEntry? >(yVals, label), IBarDataSet {
14+ open class BarDataSet (yVals : MutableList <BarEntry ?>, label : String? ) : BarLineScatterCandleBubbleDataSet<BarEntry>(yVals, label), IBarDataSet {
1515 /* *
1616 * the maximum number of bars that are stacked upon each other, this value
1717 * is calculated from the Entries that are added to the DataSet
@@ -55,13 +55,13 @@ open class BarDataSet(yVals: MutableList<BarEntry?>, label: String?) : BarLineSc
5555 protected set
5656
5757 init {
58- mHighLightColor = Color .rgb(0 , 0 , 0 )
58+ highLightColor = Color .rgb(0 , 0 , 0 )
5959
6060 calcStackSize(yVals)
6161 calcEntryCountIncludingStacks(yVals)
6262 }
6363
64- override fun copy (): DataSet < BarEntry ?> {
64+ override fun copy (): BarDataSet {
6565 val entries: MutableList <BarEntry ?> = ArrayList ()
6666 for (i in mEntries.indices) {
6767 entries.add(mEntries[i]!! .copy())
@@ -85,14 +85,10 @@ open class BarDataSet(yVals: MutableList<BarEntry?>, label: String?) : BarLineSc
8585 }
8686
8787 override fun getFill (index : Int ): Fill ? {
88- return gradients!! .get( index % gradients!! .size)
88+ return gradients!! [ index % gradients!! .size]
8989 }
9090
91- /* *
92- * This method is deprecated.
93- * Use getFill(...) instead.
94- */
95- @Deprecated(" " )
91+ @Deprecated(" Use getFill(...) instead" )
9692 fun getGradient (index : Int ): Fill ? {
9793 return getFill(index)
9894 }
@@ -105,11 +101,7 @@ open class BarDataSet(yVals: MutableList<BarEntry?>, label: String?) : BarLineSc
105101 gradients!! .add(Fill (startColor, endColor))
106102 }
107103
108- /* *
109- * This method is deprecated.
110- * Use setFills(...) instead.
111- */
112- @Deprecated(" " )
104+ @Deprecated(" Use setFills(...) instead" )
113105 fun setGradientColors (gradientColors : MutableList <Fill ?>? ) {
114106 this .gradients = gradientColors
115107 }
@@ -137,7 +129,7 @@ open class BarDataSet(yVals: MutableList<BarEntry?>, label: String?) : BarLineSc
137129 }
138130
139131 /* *
140- * calculates the maximum stacksize that occurs in the Entries array of this
132+ * calculates the maximum stackSize that occurs in the Entries array of this
141133 * DataSet
142134 */
143135 private fun calcStackSize (yVals : MutableList <BarEntry ?>) {
@@ -238,7 +230,7 @@ open class BarDataSet(yVals: MutableList<BarEntry?>, label: String?) : BarLineSc
238230 return mStackLabels
239231 }
240232
241- override fun getEntryIndex (entry : BarEntry ? ): Int {
233+ override fun getEntryIndex (entry : BarEntry ): Int {
242234 return this .getEntryIndex(entry)
243235 }
244236}
0 commit comments