<commit_before>package tripleplay.ui;

import pythagoras.f.Dimension;
import pythagoras.f.IDimension;

/**
 * A widget that allows configuring its preferred size. The size is always returned when the size
 * of the widget is calculated, but the widget may end up being stretched when contained in a
 * layout that does so.
 * TODO: is there some way to roll this into Element? It seems like any element could potentially
 * have its size configured, depending on the application
 * TODO: a better name
 */
public class SizableWidget<T extends Widget<T>> extends Widget<T>
{
    /** Creates the sizable widget with preferred width and height of 0. */
    public SizableWidget () {
        this(0, 0);
    }

    /** Creates the sizable widget with the given preferred size. */
    public SizableWidget (IDimension size) {
        this(size.width(), size.height());<commit_msg>Correct generic type<commit_after>package tripleplay.ui;

import pythagoras.f.Dimension;
import pythagoras.f.IDimension;

/**
 * A widget that allows configuring its preferred size. The size is always returned when the size
 * of the widget is calculated, but the widget may end up being stretched when contained in a
 * layout that does so.
 * TODO: is there some way to roll this into Element? It seems like any element could potentially
 * have its size configured, depending on the application
 * TODO: a better name
 */
public class SizableWidget<T extends SizableWidget<T>> extends Widget<T>
{
    /** Creates the sizable widget with preferred width and height of 0. */
    public SizableWidget () {
        this(0, 0);
    }

    /** Creates the sizable widget with the given preferred size. */
    public SizableWidget (IDimension size) {
        this(size.width(), size.height());
{'fraction_non_alphanumeric': 0.0782312925170068, 'fraction_numerical': 0.003401360544217687, 'mean_word_length': 3.6569920844327175, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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': '973710', 'n_tokens_mistral': 468, 'n_tokens_neox': 461, 'n_words': 219}