<commit_before>package com.johnuckele.vivarium.serialization;

import com.johnuckele.vivarium.audit.AuditFunction;
import com.johnuckele.vivarium.audit.AuditRecord;
import com.johnuckele.vivarium.core.Blueprint;
import com.johnuckele.vivarium.core.Creature;
import com.johnuckele.vivarium.core.Species;
import com.johnuckele.vivarium.core.World;
import com.johnuckele.vivarium.core.brain.Brain;

public enum SerializationCategory
{
    AUDIT_FUNCTION, AUDIT_RECORD, BRAIN, BLUEPRINT, CREATURE, SPECIES, WORLD;

    public static SerializationCategory[] rankedValues()
    {
        return result;
    }

    public static SerializationCategory getCategoryForClass(Class<?> clazz)
    {
        if (AuditFunction.class.isAssignableFrom(clazz))
        {
            return AUDIT_FUNCTION;
        }
        else if (AuditRecord.class.isAssignableFrom(clazz))
        {
            return AUDIT_RECORD;
        }
        else if (Brain.class.isAssignableFrom(clazz))
        {
            return BRAIN;
        }
        else if (Blueprint.class.isAssignableFrom(clazz))
        {
            return BLUEPRINT;
        }
        else if (Creature.class.isAssignableFrom(clazz))
        {
            return CREATURE;
        }
        else if (Species.class.isAssignableFrom(clazz))
        {
            return SPECIES;
        }
        else if (World.class.isAssignableFrom(clazz))
        {
            return WORLD;
        }
        else
        {
            throw new IllegalStateException("Unable to determine serialization category of " + clazz);
        }
    }

    private static SerializationCategory[] result = { SPECIES, AUDIT_FUNCTION, BLUEPRINT, BRAIN, CREATURE, AUDIT_RECORD,
            WORLD };
}<commit_msg>Fixed codestyle issue with exposure of static read only data in SerializationCategory<commit_after>package com.johnuckele.vivarium.serialization;

import java.util.Arrays;
import java.util.Collections;
import java.util.List;

import com.johnuckele.vivarium.audit.AuditFunction;
import com.johnuckele.vivarium.audit.AuditRecord;
import com.johnuckele.vivarium.core.Blueprint;
import com.johnuckele.vivarium.core.Creature;
import com.johnuckele.vivarium.core.Species;
import com.johnuckele.vivarium.core.World;
import com.johnuckele.vivarium.core.brain.Brain;

public enum SerializationCategory
{
    AUDIT_FUNCTION, AUDIT_RECORD, BRAIN, BLUEPRINT, CREATURE, SPECIES, WORLD;

    public static List<SerializationCategory> rankedValues()
    {
        return Collections.unmodifiableList(Arrays.asList(RANKED_VALUES));
    }

    public static SerializationCategory getCategoryForClass(Class<?> clazz)
    {
        if (AuditFunction.class.isAssignableFrom(clazz))
        {
            return AUDIT_FUNCTION;
        }
        else if (AuditRecord.class.isAssignableFrom(clazz))
        {
            return AUDIT_RECORD;
        }
        else if (Brain.class.isAssignableFrom(clazz))
        {
            return BRAIN;
        }
        else if (Blueprint.class.isAssignableFrom(clazz))
        {
            return BLUEPRINT;
        }
        else if (Creature.class.isAssignableFrom(clazz))
        {
            return CREATURE;
        }
        else if (Species.class.isAssignableFrom(clazz))
        {
            return SPECIES;
        }
        else if (World.class.isAssignableFrom(clazz))
        {
            return WORLD;
        }
        else
        {
            throw new IllegalStateException("Unable to determine serialization category of " + clazz);
        }
    }

    private static final SerializationCategory[] RANKED_VALUES = { SPECIES, AUDIT_FUNCTION, BLUEPRINT, BRAIN, CREATURE,
            AUDIT_RECORD, WORLD };
}
{'fraction_non_alphanumeric': 0.08519324986390854, 'fraction_numerical': 0.0, 'mean_word_length': 2.5133843212237093, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 6, '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': '2148938', 'n_tokens_mistral': 1158, 'n_tokens_neox': 1122, 'n_words': 202}