All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.github.dailystruggle.rtp.common.commands.BaseRTPCmdImpl Maven / Gradle / Ivy

There is a newer version: 2.0.15
Show newest version
package io.github.dailystruggle.rtp.common.commands;

import io.github.dailystruggle.commandsapi.common.CommandParameter;
import io.github.dailystruggle.commandsapi.common.CommandsAPICommand;
import org.jetbrains.annotations.Nullable;

import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

public abstract class BaseRTPCmdImpl implements BaseRTPCmd {
    protected final Map parameterLookup = new ConcurrentHashMap<>();
    // key: command name
    // value: command object
    protected final Map commandLookup = new ConcurrentHashMap<>();
    private final CommandsAPICommand parent;
    protected long avgTime = 0;

    public BaseRTPCmdImpl(@Nullable CommandsAPICommand parent) {
        this.parent = parent;
    }

    @Override
    public CommandsAPICommand parent() {
        return parent;
    }

    @Override
    public Map getParameterLookup() {
        return parameterLookup;
    }

    @Override
    public Map getCommandLookup() {
        return commandLookup;
    }

    @Override
    public long avgTime() {
        return avgTime;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy