File tree Expand file tree Collapse file tree 4 files changed +8
-6
lines changed
MPChartLib/src/main/java/com/github/mikephil/charting Expand file tree Collapse file tree 4 files changed +8
-6
lines changed Original file line number Diff line number Diff line change 1616public class LimitLine extends ComponentBase {
1717
1818 /** limit / maximum (the y-value or xIndex) */
19- private float mLimit ;
19+ private final float mLimit ;
2020
2121 /** the width of the limit line */
2222 private float mLineWidth = 2f ;
@@ -130,7 +130,7 @@ public void disableDashedLine() {
130130 * disabled
131131 */
132132 public boolean isDashedLineEnabled () {
133- return mDashPathEffect == null ? false : true ;
133+ return mDashPathEffect != null ;
134134 }
135135
136136 /**
Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ public float getHigh() {
3939 /**
4040 * limit / maximum (the y-value or xIndex)
4141 */
42- private Range mLimit ;
42+ private final Range mLimit ;
4343
4444 /**
4545 * the width of the limit line
@@ -182,7 +182,7 @@ public void disableDashedLine() {
182182 * disabled
183183 */
184184 public boolean isDashedLineEnabled () {
185- return mDashPathEffect == null ? false : true ;
185+ return mDashPathEffect != null ;
186186 }
187187
188188 /**
Original file line number Diff line number Diff line change 77import java .util .ArrayList ;
88import java .util .List ;
99
10+ import androidx .annotation .NonNull ;
11+
1012/**
1113 * The DataSet class represents one group or type of entries (Entry) in the
1214 * Chart that belong together. It is designed to logically separate different
@@ -254,7 +256,7 @@ public void clear() {
254256 }
255257
256258 @ Override
257- public boolean addEntry (T entry ) {
259+ public boolean addEntry (@ NonNull T entry ) {
258260 List <T > values = getEntries ();
259261 if (values == null ) {
260262 values = new ArrayList <>();
Original file line number Diff line number Diff line change @@ -226,7 +226,7 @@ public void disableDashedLine() {
226226
227227 @ Override
228228 public boolean isDashedLineEnabled () {
229- return mDashPathEffect == null ? false : true ;
229+ return mDashPathEffect != null ;
230230 }
231231
232232 @ Override
You can’t perform that action at this time.
0 commit comments