<commit_before>package info.faceland.loot.groups;

import info.faceland.loot.api.groups.ItemGroup;
import org.bukkit.Material;

import java.util.HashSet;
import java.util.Set;

public final class LootItemGroup implements ItemGroup {

    private final String name;
    private final Set<Material> legalMaterials;

    public LootItemGroup(String name) {
        this.name = name;
        this.legalMaterials = new HashSet<>();
    }

    @Override
    public String getName() {
        return name;
    }

    @Override
    public Set<Material> getLegalMaterials() {
        return new HashSet<>(legalMaterials);
    }

    @Override
    public void addLegalMaterial(Material material) {
        legalMaterials.add(material);
    }

    @Override
    public void removeLegalMaterial(Material material) {
        legalMaterials.remove(material);
    }

    @Override
    public boolean isLegalMaterial(Material material) {
        return legalMaterials.contains(material);
    }

}<commit_msg>implementing new methods<commit_after>package info.faceland.loot.groups;

import info.faceland.loot.api.groups.ItemGroup;
import org.bukkit.Material;

import java.util.HashSet;
import java.util.Set;

public final class LootItemGroup implements ItemGroup {

    private final String name;
    private final boolean inverse;
    private final Set<Material> legalMaterials;

    public LootItemGroup(String name, boolean inv) {
        this.name = name;
        this.legalMaterials = new HashSet<>();
        this.inverse = inv;
    }

    @Override
    public String getName() {
        return name;
    }

    @Override
    public Set<Material> getMaterials() {
        return new HashSet<>(legalMaterials);
    }

    @Override
    public void addMaterial(Material material) {
        legalMaterials.add(material);
    }

    @Override
    public void removeMaterial(Material material) {
        legalMaterials.remove(material);
    }

    @Override
    public boolean hasMaterial(Material material) {
        return legalMaterials.contains(material);
    }

    @Override
    public boolean isInverse() {
        return inverse;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }

        LootItemGroup that = (LootItemGroup) o;

        return inverse == that.inverse && !(name != null ? !name.equals(that.name) : that.name != null);
    }

    @Override
    public int hashCode() {
        int result = name != null ? name.hashCode() : 0;
        result = 31 * result + (inverse ? 1 : 0);
        return result;
    }

}
{'fraction_non_alphanumeric': 0.09760658189977561, 'fraction_numerical': 0.0018698578908002991, 'mean_word_length': 2.609986504723347, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1215451', 'n_tokens_mistral': 775, 'n_tokens_neox': 723, 'n_words': 191}