package kr.co.compcarecompany.Data;

import com.google.gson.annotations.SerializedName;

import java.util.ArrayList;

public class ArrayItem<T> extends BaseResult {
    @SerializedName("arrayItem")
    private ArrayList<T> arrayitem;

    public ArrayList<T> getArrayitem() {
        return arrayitem;
    }

    public int size(){
        return getArrayitem().size();
    }

    public T get(int position){
        return getArrayitem().get(position);
    }

    public void clear(){
        getArrayitem().clear();
    }

    public void add(T obj){
        this.arrayitem.add(obj);
    }

    public void addPosition(int position, T obj){
        this.arrayitem.add(position, obj);
    }

    public void addAll(ArrayItem<T> list){
        this.arrayitem = list.arrayitem;
    }
}
