package com.seewo.factoryaging.s0;

import android.content.Context;
import j.p0.d.r;
import java.io.File;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.Locale;

/* JADX INFO: compiled from: BaseValueRecord.kt */
/* JADX INFO: loaded from: classes.dex */
public abstract class f<T> {
    private static final SimpleDateFormat d = new SimpleDateFormat("yyyyMMdd_HHmmss", Locale.CHINA);
    private Context a;
    private ArrayList<T> b;
    private File c;

    public f(Context context) {
        r.f(context, "mContext");
        this.a = context;
        this.b = new ArrayList<>();
        this.b = new ArrayList<>();
        e();
    }

    private final void e() {
        File file = new File(h.c.d.c.a.d().c(), "FactoryAging/" + f());
        if (!file.exists()) {
            file.mkdirs();
        }
        this.c = new File(file, d.format(new Date(System.currentTimeMillis())) + ".xls");
    }

    public final void a(T t) {
        ArrayList<T> arrayList = this.b;
        r.c(arrayList);
        arrayList.add(t);
    }

    protected final Context b() {
        return this.a;
    }

    protected final File c() {
        return this.c;
    }

    protected final ArrayList<T> d() {
        return this.b;
    }

    public abstract String f();
}
