Back to project page Thrift-box.
The source code is released under:
GNU General Public License
If you think the Android project Thrift-box listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.github.mikephil.charting.utils; // w w w .j a va 2 s .com /** * Contains information needed to determine the highlighted value. * * @author Philipp Jahoda */ public class Highlight { /** the x-index of the highlighted value */ private int mXIndex; /** the index of the dataset the highlighted value is in */ private int mDataSetIndex; /** * constructor * * @param x the index of the highlighted value on the x-axis * @param val the value at the position the user touched * @param dataSet the index of the DataSet the highlighted value belongs to */ public Highlight(int x, int dataSet) { this.mXIndex = x; this.mDataSetIndex = dataSet; } /** * returns the index of the DataSet the highlighted value is in * * @return */ public int getDataSetIndex() { return mDataSetIndex; } /** * returns the index of the highlighted value on the x-axis * * @return */ public int getXIndex() { return mXIndex; } /** * returns true if this highlight object is equal to the other (compares * xIndex and dataSetIndex) * * @param h * @return */ public boolean equalTo(Highlight h) { if (h == null) return false; else { if (this.mDataSetIndex == h.mDataSetIndex && this.mXIndex == h.mXIndex) return true; else return false; } } }