package com.meituan.sample.robusttest;

import android.util.Log;

import com.meituan.sample.robusttest.other.Hll;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by c_kunwu on 16/5/5.
 */
public class State<T> extends AsbtractInner implements Cloneable, Comparable {
    public static int index = 0;
    public int index1 = 0;
    public String tag = "current";
    public Hll hll;

    public long getIndex() {
        getText(1, 2L, 1);
        return -100;
    }

    public String getText(int i, Long j, Integer x) {
        State state = new State(new Hll(true));
        state.index1 = 3;
        state.hll.needP();
        Hll h = state.hll;
        state.get();
        h.needP();
        state.setIndex(hll, 1, 2L, new Object());
        return tag + ": ";
    }


    public State(Hll hll) {
        this.hll = hll;
    }

    public void setIndex(Hll hll, int i, Long j, Object x) {
        this.hll = hll;
        hll.needP();
//        State.staticMethod();
    }

    public List<T> getT(Hll hll, int i, Long j, Object x) {
        List<T> list = new ArrayList<>();
        Integer p = Integer.reverse(index);
        list.add((T) p);
        return list;
    }

    public T get() {
        Log.d("robust", "in state.get()  ");
        return getT(hll, 0, 1L, new Object()).get(0);
    }

    @Override
    public int compareTo(Object another) {
        return 0;
    }

    @Override
    public int getTime() {
        return 0;
    }

    @Override
    public String getName() {
        return null;
    }

    @Override
    public void setName(String name) {


    }


    class Inner {
        private int time;
        private String name;

        public int getTime() {
            return time;
        }

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public String getAnswer(String name) {
//            return "you make it";
            return "hell world";
        }
    }
}

abstract class AsbtractInner {

    public abstract int getTime();

    public abstract String getName();

    public abstract void setName(String name);

    public String getAnswer(String name) {
//            return "you make it";
        return "hell world";
    }
}

@@ -226,30 +226,8 @@
 e%3CT%3E
- extends AsbtractInner
  imp
@@ -1373,38 +1373,24 @@
 n 0;%0A    %7D%0A%0A
-    @Override%0A
     public i
@@ -1396,32 +1396,32 @@
 int getTime() %7B%0A
+
         return 0
@@ -1425,38 +1425,24 @@
 n 0;%0A    %7D%0A%0A
-    @Override%0A
     public S
@@ -1483,38 +1483,24 @@
 ull;%0A    %7D%0A%0A
-    @Override%0A
     public v
@@ -1970,275 +1970,4 @@
 %0A%7D%0A%0A
-abstract class AsbtractInner %7B%0A%0A    public abstract int getTime();%0A%0A    public abstract String getName();%0A%0A    public abstract void setName(String name);%0A%0A    public String getAnswer(String name) %7B%0A//            return %22you make it%22;%0A        return %22hell world%22;%0A    %7D%0A%7D%0A

remove AsbtractInner class