
module ComparableMoreModule
{
    include ComparableModule;
     
    virtual bool operator >(Self@Nullable right) throws TypeError {
        if(self.type() != right.type()) {
            throw new TypeError("type error");
        }
        else {
            return self.ID() > right.ID();
        }
    }

    virtual bool operator <(Self@Nullable right) throws TypeError {
        if(self.type() != right.type()) {
            throw new TypeError("type error");
        }
        else {
            return self.ID() < right.ID();
        }
    }

    virtual bool operator >=(Self@Nullable right) throws TypeError {
        return self > right || self == right;
    }

    virtual bool operator <=(Self@Nullable right) throws TypeError {
        return self < right || self == right;
    }
}


class GenericsTest24ClassB 
{
    protected int value;

    GenericsTest24ClassB(int value) {
        self.value = value;
    }

    int getValue() {
        return self.value;
    }
}

class GenericsTest24ClassC extends GenericsTest24ClassB 
{
    private int value2;

    GenericsTest24ClassC(int value) {
        super(value);
    }

    GenericsTest24ClassC(int value, int value2) {
        self.value = value;
        self.value2 = value2;
    }

    int getValue2() {
        return self.value2;
    }

    include ComparableMoreModule;
}

interface GenericsTest24ClassD 
{
    int getNumber();
}

class GenericsTest24ClassE implements GenericsTest24ClassD, IInspectable, ICloneable, IComparableMore 
{
    int number;

    GenericsTest24ClassE(int number) {
        self.number = number;
    }

    int getNumber() {
        return self.number;
    }

    virtual String toString() {
        return self.number.toString();
    }

    virtual GenericsTest24ClassE clone() throws Exception {
        return super();
    }

    include ComparableMoreModule;
}

class GenericsTest24ClassA <T extends GenericsTest24ClassC, T2 implements GenericsTest24ClassD&IInspectable&ICloneable&IComparableMore>
{
    T field;
    Array<T> field2;
    Array<T2> field3;

    GenericsTest24ClassA() {
        self.field = new T(123, 345);

        self.field2 = new Array<T>();
        self.field2.add(new GenericsTest24ClassC(234, 567));
        self.field2.add(new GenericsTest24ClassC(345, 678));

        self.field3 = new Array<T2>();
        self.field3.add(new GenericsTest24ClassE(13579));
    }
}


