<commit_before>package com.akikanellis.kata01.offer;

import java.util.Collection;
import java.util.Collections;
import java.util.HashSet;
import java.util.Set;
import java.util.stream.Stream;

/**
 * A representation of a collection of {@link com.akikanellis.kata01.offer.OfferStrategies}.
 */
public final class OfferStrategies {
    private final Set<OfferStrategy> strategies;

    private OfferStrategies(Collection<OfferStrategy> strategies) { this.strategies = new HashSet<>(strategies); }

    public static OfferStrategies fromCollection(Collection<OfferStrategy> offerStrategies) {
        return new OfferStrategies(offerStrategies);
    }

    public static OfferStrategies empty() { return new OfferStrategies(Collections.emptyList()); }

    public boolean isEmpty() { return strategies.isEmpty(); }<commit_msg>Use static factory method instead of constructor<commit_after>package com.akikanellis.kata01.offer;

import java.util.Collection;
import java.util.Collections;
import java.util.HashSet;
import java.util.Set;
import java.util.stream.Stream;

/**
 * A representation of a collection of {@link com.akikanellis.kata01.offer.OfferStrategies}.
 */
public final class OfferStrategies {
    private final Set<OfferStrategy> strategies;

    private OfferStrategies(Collection<OfferStrategy> strategies) { this.strategies = new HashSet<>(strategies); }

    public static OfferStrategies fromCollection(Collection<OfferStrategy> offerStrategies) {
        return new OfferStrategies(offerStrategies);
    }

    public static OfferStrategies empty() { return fromCollection(Collections.emptyList()); }

    public boolean isEmpty() { return strategies.isEmpty(); }
{'fraction_non_alphanumeric': 0.09642857142857143, 'fraction_numerical': 0.004761904761904762, 'mean_word_length': 5.319548872180451, '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': '5219810', 'n_tokens_mistral': 495, 'n_tokens_neox': 467, 'n_words': 113}