class Tuple implements Comparable<Tuple> {

    @Override
    public int compareTo(Tuple o)
    {
        checkArgument(o.getTypes().size() == types.size(), "types must be of same size");
        for (int i = 0; i < types.size(); i++) {
            checkArgument(o.getTypes().get(i).equals(types.get(i)), "types must be the same");
        }

        for (int i = 0; i < types.size(); i++) {
            Object o1 = values.get(i);
            Object o2 = o.getValues().get(i);

            int result = compare(o1, o2);
            if (result != 0) {
                return result;
            }
        }
        return 0;
    }

    public  Tuple(Type type, Object value);
    public  Tuple(List<Type> types, Object... values);
    public  Tuple(List<Type> types, List<Object> values);

}