package com.ahau.againstpest.bean;

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

/**
 * 注释:害虫等级的封装
 * 使用Gson解析时，对象书写技巧：
 * 1、逢{}创建对象，逢[]创建集合
 * 2、所有字段名称和json返回名称完全一致
 *
 * @author fanchunchun
 * @date 2018/3/31
 */

public class PestBean {
    public ArrayList<Pest> pest;

    @Override
    public String toString() {
        return "PestBean [pest= " + pest
                + "]";
    }

    public class Pest {
        public String pestname;
        public List<PestGrade> grade;

        @Override
        public String toString() {
            return pestname;
        }

        public class PestGrade {
            public String firstgrade;
            public List<SecondGrade> nextgrade;

            @Override
            public String toString() {
                return firstgrade;
            }
            /*@Override
            public String toString() {
                return "PestGrade [firstgrade=" + firstgrade + ", nextgrade=" + nextgrade
                        + "]";
            }*/

            public class SecondGrade {
                public String secondgrade;

                /*@Override
                public String toString() {
                    return "SecondGrade [secondgrade=" + secondgrade + "]";
                }*/

                @Override
                public String toString() {
                    return secondgrade;
                }
            }
        }
    }


}





