//TwoParameterGenericClass.java

//A simple generic class with two type parameters: T1 and T2.
//Note that the two types could be the same, but if that were
//always the case, only one type parameter would be needed.
class TwoParameterGenericClass<T1, T2>
{
    T1 object1;
    T2 object2;

    TwoParameterGenericClass
    (
        T1 o1,
        T2 o2
    )
    {
        object1 = o1;
        object2 = o2;
    }

    //Show types of T1 and T2.
    void showTypes()
    {
        System.out.println("Type of T1 is " + object1.getClass().getName());
        System.out.println("Type of T2 is " + object2.getClass().getName());
    }

    T1 getObject1()
    {
        return object1;
    }

    T2 getObject2()
    {
        return object2;
    }
}
