<commit_before>/*
 * See the NOTICE file distributed with this work for additional
 * information regarding copyright ownership.
 *
 * This is free software; you can redistribute it and/or modify it
 * under the terms of the GNU Lesser General Public License as
 * published by the Free Software Foundation; either version 2.1 of
 * the License, or (at your option) any later version.
 *
 * This software is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this software; if not, write to the Free
 * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
 * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
 *
 */
package com.xpn.xwiki.objects.classes;

/**
 * An entry in a List or in a Tree.
 * 
 * @version $Id$
 */
public class ListItem
{
    /** A unique identifier of this item, the actual value stored in the database when selecting items from a list. */
    private String id = "";

    /** A user-friendly value that gets displayed in the user interface, representing this item. */
    private String value = "";

    /** An optional reference to another item that allows to build parent-child relations, forming a tree. */
    private String parent = "";

    /**
     * Constructor that initializes both the {@link #id internal ID} and the {@link #value displayed value} with the
     * same value, leaving the {@link #parent} field empty.
     * 
     * @param id the value to use for the id and the displayed value
     */
    public ListItem(String id)
    {
        this.setId(id);
        this.setValue(id);
    }

    /**
     * Constructor that initializes the {@link #id internal ID} and the {@link #value displayed value}, leaving the
     * {@link #parent} field empty.
     * 
     * @param id the value to use for the internal id
     * @param value the value to use for the displayed value
     */
    public ListItem(String id, String value)
    {
        this.setId(id);
        this.setValue(value);
    }

    /**
     * Constructor that initializes all of the {@link #id internal ID}, the {@link #value displayed value}, and the
     * {@link #parent} fields.
     * 
     * @param id the value to use for the internal id
     * @param value the value to use for the displayed value
     * @param parent the value to use for the item's parent
     */
    public ListItem(String id, String value, String parent)
    {
        this.setId(id);
        this.setValue(value);
        this.setParent(parent);
    }

    public String getId()
    {
        return this.id;
    }

    public void setId(String id)
    {
        this.id = id;
    }

    public String getValue()
    {
        return this.value;
    }

    public void setValue(String value)
    {
        this.value = value;
    }

    public String getParent()
    {
        return this.parent;
    }

    public void setParent(String parent)
    {
        this.parent = parent;
    }
}
<commit_msg>[misc] Add a toString method useful for debug<commit_after>/*
 * See the NOTICE file distributed with this work for additional
 * information regarding copyright ownership.
 *
 * This is free software; you can redistribute it and/or modify it
 * under the terms of the GNU Lesser General Public License as
 * published by the Free Software Foundation; either version 2.1 of
 * the License, or (at your option) any later version.
 *
 * This software is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this software; if not, write to the Free
 * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
 * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
 *
 */
package com.xpn.xwiki.objects.classes;

/**
 * An entry in a List or in a Tree.
 * 
 * @version $Id$
 */
public class ListItem
{
    /** A unique identifier of this item, the actual value stored in the database when selecting items from a list. */
    private String id = "";

    /** A user-friendly value that gets displayed in the user interface, representing this item. */
    private String value = "";

    /** An optional reference to another item that allows to build parent-child relations, forming a tree. */
    private String parent = "";

    /**
     * Constructor that initializes both the {@link #id internal ID} and the {@link #value displayed value} with the
     * same value, leaving the {@link #parent} field empty.
     * 
     * @param id the value to use for the id and the displayed value
     */
    public ListItem(String id)
    {
        this.setId(id);
        this.setValue(id);
    }

    /**
     * Constructor that initializes the {@link #id internal ID} and the {@link #value displayed value}, leaving the
     * {@link #parent} field empty.
     * 
     * @param id the value to use for the internal id
     * @param value the value to use for the displayed value
     */
    public ListItem(String id, String value)
    {
        this.setId(id);
        this.setValue(value);
    }

    /**
     * Constructor that initializes all of the {@link #id internal ID}, the {@link #value displayed value}, and the
     * {@link #parent} fields.
     * 
     * @param id the value to use for the internal id
     * @param value the value to use for the displayed value
     * @param parent the value to use for the item's parent
     */
    public ListItem(String id, String value, String parent)
    {
        this.setId(id);
        this.setValue(value);
        this.setParent(parent);
    }

    public String getId()
    {
        return this.id;
    }

    public void setId(String id)
    {
        this.id = id;
    }

    public String getValue()
    {
        return this.value;
    }

    public void setValue(String value)
    {
        this.value = value;
    }

    public String getParent()
    {
        return this.parent;
    }

    public void setParent(String parent)
    {
        this.parent = parent;
    }

    /**
     * {@inheritDoc}
     * 
     * @see Object#toString()
     */
    @Override
    public String toString()
    {
        return "[" + getId() + ", " + getValue() + ", " + getParent() + "]";
    }
}

{'fraction_non_alphanumeric': 0.08910741301059001, 'fraction_numerical': 0.003933434190620273, 'mean_word_length': 2.486814345991561, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '2893423', 'n_tokens_mistral': 1811, 'n_tokens_neox': 1762, 'n_words': 800}