// Path: app/libs/MPAndroidChart-2.2.3/MPAndroidChart-2.2.3/MPChartLib/src/com/github/mikephil/charting/interfaces/datasets/ILineDataSet.java
// public interface ILineDataSet extends ILineRadarDataSet<Entry> {
// 
//     /**
//      * Returns the intensity of the cubic lines (the effect intensity).
//      * Max = 1f = very cubic, Min = 0.05f = low cubic effect, Default: 0.2f
//      *
//      * @return
//      */
//     float getCubicIntensity();
// 
//     /**
//      * Returns true if drawing cubic lines is enabled, false if not.
//      *
//      * @return
//      */
//     boolean isDrawCubicEnabled();
// 
//     /**
//      * Returns the size of the drawn circles.
//      */
//     float getCircleRadius();
// 
//     /**
//      * Returns the color at the given index of the DataSet's circle-color array.
//      * Performs a IndexOutOfBounds check by modulus.
//      *
//      * @param index
//      * @return
//      */
//     int getCircleColor(int index);
// 
//     /**
//      * Returns true if drawing circles for this DataSet is enabled, false if not
//      *
//      * @return
//      */
//     boolean isDrawCirclesEnabled();
// 
//     /**
//      * Returns the color of the inner circle (the circle-hole).
//      *
//      * @return
//      */
//     int getCircleHoleColor();
// 
//     /**
//      * Returns true if drawing the circle-holes is enabled, false if not.
//      *
//      * @return
//      */
//     boolean isDrawCircleHoleEnabled();
// 
//     /**
//      * Returns the DashPathEffect that is used for drawing the lines.
//      *
//      * @return
//      */
//     DashPathEffect getDashPathEffect();
// 
//     /**
//      * Returns true if the dashed-line effect is enabled, false if not.
//      * If the DashPathEffect object is null, also return false here.
//      *
//      * @return
//      */
//     boolean isDashedLineEnabled();
// 
//     /**
//      * Returns the FillFormatter that is set for this DataSet.
//      *
//      * @return
//      */
//     FillFormatter getFillFormatter();
// }


import com.github.mikephil.charting.data.Entry;
import com.github.mikephil.charting.interfaces.datasets.ILineDataSet;

package com.github.mikephil.charting.buffer;


public class LineBuffer extends AbstractBuffer<ILineDataSet> {

    public LineBuffer(int size) {
        super((size < 4) ? 4 : size);
    }

    public void moveTo(float x, float y) {

        if (index != 0)
            return;

        buffer[index++] = x;
        buffer[index++] = y;

        // in case just one entry, this is overwritten when lineTo is called
        buffer[index] = x;
        buffer[index + 1] = y;
    }

    public void lineTo(float x, float y) {

        if (index == 2) {
            buffer[index++] = x;
            buffer[index++] = y;
        } else {

            float prevX = buffer[index - 2];
            float prevY = buffer[index - 1];
            buffer[index++] = prevX;
            buffer[index++] = prevY;
            buffer[index++] = x;
            buffer[index++] = y;
        }
    }

    @Override
// Path: app/libs/MPAndroidChart-2.2.3/MPAndroidChart-2.2.3/MPChartLib/src/com/github/mikephil/charting/interfaces/datasets/ILineDataSet.java
// public interface ILineDataSet extends ILineRadarDataSet<Entry> {
// 
//     /**
//      * Returns the intensity of the cubic lines (the effect intensity).
//      * Max = 1f = very cubic, Min = 0.05f = low cubic effect, Default: 0.2f
//      *
//      * @return
//      */
//     float getCubicIntensity();
// 
//     /**
//      * Returns true if drawing cubic lines is enabled, false if not.
//      *
//      * @return
//      */
//     boolean isDrawCubicEnabled();
// 
//     /**
//      * Returns the size of the drawn circles.
//      */
//     float getCircleRadius();
// 
//     /**
//      * Returns the color at the given index of the DataSet's circle-color array.
//      * Performs a IndexOutOfBounds check by modulus.
//      *
//      * @param index
//      * @return
//      */
//     int getCircleColor(int index);
// 
//     /**
//      * Returns true if drawing circles for this DataSet is enabled, false if not
//      *
//      * @return
//      */
//     boolean isDrawCirclesEnabled();
// 
//     /**
//      * Returns the color of the inner circle (the circle-hole).
//      *
//      * @return
//      */
//     int getCircleHoleColor();
// 
//     /**
//      * Returns true if drawing the circle-holes is enabled, false if not.
//      *
//      * @return
//      */
//     boolean isDrawCircleHoleEnabled();
// 
//     /**
//      * Returns the DashPathEffect that is used for drawing the lines.
//      *
//      * @return
//      */
//     DashPathEffect getDashPathEffect();
// 
//     /**
//      * Returns true if the dashed-line effect is enabled, false if not.
//      * If the DashPathEffect object is null, also return false here.
//      *
//      * @return
//      */
//     boolean isDashedLineEnabled();
// 
//     /**
//      * Returns the FillFormatter that is set for this DataSet.
//      *
//      * @return
//      */
//     FillFormatter getFillFormatter();
// }


// Path: app/libs/MPAndroidChart-2.2.3/MPAndroidChart-2.2.3/MPChartLib/src/com/github/mikephil/charting/buffer/LineBuffer.java
import com.github.mikephil.charting.data.Entry;
import com.github.mikephil.charting.interfaces.datasets.ILineDataSet;


package com.github.mikephil.charting.buffer;


public class LineBuffer extends AbstractBuffer<ILineDataSet> {

    public LineBuffer(int size) {
        super((size < 4) ? 4 : size);
    }

    public void moveTo(float x, float y) {

        if (index != 0)
            return;

        buffer[index++] = x;
        buffer[index++] = y;

        // in case just one entry, this is overwritten when lineTo is called
        buffer[index] = x;
        buffer[index + 1] = y;
    }

    public void lineTo(float x, float y) {

        if (index == 2) {
            buffer[index++] = x;
            buffer[index++] = y;
        } else {

            float prevX = buffer[index - 2];
            float prevY = buffer[index - 1];
            buffer[index++] = prevX;
            buffer[index++] = prevY;
            buffer[index++] = x;
            buffer[index++] = y;
        }
    }

    @Override
    public void feed(ILineDataSet data) {