<commit_before>package org.ovirt.engine.ui.uicommonweb.models.hosts.network;

import org.ovirt.engine.ui.uicommonweb.models.ListModel;
import org.ovirt.engine.ui.uicommonweb.models.hosts.HostSetupNetworksModel;

/**
 * Base class for Network Item Models
 *
 * @param <T>
 *            The Item status enum type
 */
public abstract class NetworkItemModel<T extends Enum<T>> extends ListModel implements Comparable<NetworkItemModel<T>> {

    private final HostSetupNetworksModel setupModel;

    private String error = null;

    /**
     * Create a Network item for the specified Setup Model
     *
     * @param setupModel
     */
    public NetworkItemModel(HostSetupNetworksModel setupModel) {
        this.setupModel = setupModel;
    }

    @Override
    public int compareTo(NetworkItemModel<T> o) {
        return getName().compareTo(o.getName());
    }

    public String getError() {<commit_msg>webadmin: Improved Comparable implementation of NetworkItemModel<commit_after>package org.ovirt.engine.ui.uicommonweb.models.hosts.network;

import org.ovirt.engine.core.common.utils.LexoNumericComparator;
import org.ovirt.engine.ui.uicommonweb.models.ListModel;
import org.ovirt.engine.ui.uicommonweb.models.hosts.HostSetupNetworksModel;

/**
 * Base class for Network Item Models
 *
 * @param <T>
 *            The Item status enum type
 */
public abstract class NetworkItemModel<T extends Enum<T>> extends ListModel implements Comparable<NetworkItemModel<T>> {

    private final HostSetupNetworksModel setupModel;

    private String error = null;

    /**
     * Create a Network item for the specified Setup Model
     *
     * @param setupModel
     */
    public NetworkItemModel(HostSetupNetworksModel setupModel) {
        this.setupModel = setupModel;
    }

    @Override
    public int compareTo(NetworkItemModel<T> o) {
        return LexoNumericComparator.comp(getName(), o.getName());
    }

    public String getError() {
{'fraction_non_alphanumeric': 0.092173017507724, 'fraction_numerical': 0.0, 'mean_word_length': 3.6152019002375297, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, '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': '6749923', 'n_tokens_mistral': 572, 'n_tokens_neox': 556, 'n_words': 134}