//TripleItemManager.java

public class TripleItemManager
{
    public static void main(String[] args)
    {

        // TripleItem class with Integers
        TripleItem<Integer> triInts =
            new TripleItem<Integer>(9999, 5555, 6666);

        // TripleItem class with Shorts
        TripleItem<Short> triShorts =
            new TripleItem<Short>((short)99, (short)55, (short)66);

        // Try methods from TripleItem
        triInts.printAll();
        System.out.println("Min: " + triInts.minItem() + "\n");

        triShorts.printAll();
        System.out.println("Min: " + triShorts.minItem());

        System.out.println();

        //The following code uses non-generic "legacy" classes.
        TripleInt tripleInts = new TripleInt(9999, 5555, 6666);
        tripleInts.printAll();
        System.out.println("Min: " + tripleInts.minItem() + "\n");
        TripleShort tripleShorts = new TripleShort
        (
            (short)99, (short)55, (short)66
        );
        tripleShorts.printAll();
        System.out.println("Min: " + tripleShorts.minItem() + "\n");
    }
}

