<commit_before>package de.itagile.specification;

public class Operations<ParamType> {

    private Operations() {
    }

    public static <ParamType> Operations<ParamType> operations(Class<ParamType> clazz) {
        return new Operations<>();
    }

    public SpecificationPartial<? super ParamType> and(final SpecificationPartial<? super ParamType> first, final SpecificationPartial<? super ParamType> second) {
        return new SpecificationPartial<ParamType>() {
            @Override
            public Specification create(ParamType param) {
                return Specifications.and(first.create(param), second.create(param));
            }

            @Override
            public boolean isTrue() {
                throw new IllegalStateException();
            }
        };
    }
}<commit_msg>Added typesafe OR for specifications.<commit_after>package de.itagile.specification;

public class Operations<ParamType> {

    private Operations() {
    }

    public static <ParamType> Operations<ParamType> operations(Class<ParamType> clazz) {
        return new Operations<>();
    }

    public SpecificationPartial<? super ParamType> and(final SpecificationPartial<? super ParamType> first, final SpecificationPartial<? super ParamType> second) {
        return new SpecificationPartial<ParamType>() {
            @Override
            public Specification create(ParamType param) {
                return Specifications.and(first.create(param), second.create(param));
            }

            @Override
            public boolean isTrue() {
                throw new IllegalStateException();
            }
        };
    }

    public SpecificationPartial<? super ParamType> or(final SpecificationPartial<? super ParamType> first, final SpecificationPartial<? super ParamType> second) {
        return new SpecificationPartial<ParamType>() {
            @Override
            public Specification create(ParamType param) {
                return Specifications.or(first.create(param), second.create(param));
            }

            @Override
            public boolean isTrue() {
                throw new IllegalStateException();
            }
        };
    }
}
{'fraction_non_alphanumeric': 0.08882783882783883, 'fraction_numerical': 0.0, 'mean_word_length': 2.496, 'pattern_counts': {'":': 0, '<': 25, '<?xml version=': 0, '>': 25, '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': '7387666', 'n_tokens_mistral': 516, 'n_tokens_neox': 505, 'n_words': 132}