/*
 * Decompiled with CFR 0.152.
 * 
 * Could not load the following classes:
 *  com.ca.apim.gateway.extension.sharedstate.counter.CounterFieldOfInterest
 *  com.ca.apim.gateway.extension.sharedstate.counter.SharedCounterState
 *  com.l7tech.util.CollectionUtils$MapBuilder
 */
package com.l7tech.server.sla;

import com.ca.apim.gateway.extension.sharedstate.counter.CounterFieldOfInterest;
import com.ca.apim.gateway.extension.sharedstate.counter.SharedCounterState;
import com.l7tech.util.CollectionUtils;
import java.io.Serializable;
import java.util.Date;
import java.util.EnumMap;
import java.util.Map;

public final class CounterInfo
implements Serializable,
SharedCounterState {
    private final String name;
    private final Map<CounterFieldOfInterest, Long> counterState;
    private final Date lastUpdate;
    static final long serialVersionUID = 2194195060524348463L;

    @Deprecated
    public CounterInfo(String string, long l2, long l3, long l4, long l5, long l6, Date date) {
        this(string, new EnumMap<CounterFieldOfInterest, Long>(CollectionUtils.MapBuilder.builder().put((Object)CounterFieldOfInterest.SEC, (Object)l2).put((Object)CounterFieldOfInterest.MIN, (Object)l3).put((Object)CounterFieldOfInterest.HOUR, (Object)l4).put((Object)CounterFieldOfInterest.DAY, (Object)l5).put((Object)CounterFieldOfInterest.MONTH, (Object)l6).unmodifiableMap()), date);
    }

    public CounterInfo(String string, Map<CounterFieldOfInterest, Long> map, Date date) {
        this.name = string;
        this.counterState = map;
        this.lastUpdate = date;
    }

    public String getName() {
        return this.name;
    }

    public long getCount(CounterFieldOfInterest counterFieldOfInterest) {
        return this.counterState.get(counterFieldOfInterest);
    }

    public Date getLastUpdate() {
        return this.lastUpdate;
    }
}

