package com.mineplex.studio.cache;

import com.google.common.base.MoreObjects;
import com.google.common.base.Objects;
import java.util.Map;

public final class BlockBehaviourCacheMap {
    private final Map<String, BlockBehaviourCache> blockBehaviourCache;

    public BlockBehaviourCacheMap(Map<String, BlockBehaviourCache> blockBehaviourCache) {
        this.blockBehaviourCache = blockBehaviourCache;
    }

    public Map<String, BlockBehaviourCache> getBlockBehaviourCache() {
        return this.blockBehaviourCache;
    }

    @Override
    public String toString() {
        return MoreObjects.toStringHelper(this)
                .add("blockBehaviourCache", blockBehaviourCache)
                .toString();
    }

    @Override
    public boolean equals(Object o) {
        if (!(o instanceof BlockBehaviourCacheMap that)) return false;
        return Objects.equal(getBlockBehaviourCache(), that.getBlockBehaviourCache());
    }

    @Override
    public int hashCode() {
        return Objects.hashCode(getBlockBehaviourCache());
    }
}
