public int compareTo(UniversalIndexKey other)
    {
        if(other == null)
        {
            throw new NullPointerException();
        }

        int thisSize = indexKeys.size();
        int otherSize = other.indexKeys.size();

//System.out.println("compareTo: indexKeys.size(): " + indexKeys.size() + ", other.indexKeys.size(): " + other.indexKeys.size());

        int size = thisSize <= otherSize ? thisSize : otherSize;
        for(int i = 0; i < size; i++)
        {
            Comparable firstComparable = indexKeys.get(i);
            Comparable secondComparable = other.indexKeys.get(i);

            if(firstComparable == null)
                return Integer.MIN_VALUE;

            if(secondComparable == null)
                return Integer.MAX_VALUE;

            try
            {
                int compareResult = firstComparable.compareTo(secondComparable);
//                System.out.println((i + 1) + ". " + firstComparable + " ? " + secondComparable + " = " + compareResult);
                if(compareResult != 0)
                    return compareResult;
            }
            catch(ClassCastException ex)
            {
                String s1 = String.valueOf(firstComparable);
                String s2 = String.valueOf(secondComparable);
                System.out.println("s1: " + s1 + ", s2: " + s2);
                return s1.compareTo(s2);
            }
        }

        if(thisSize < otherSize)
        {
            return -1;
        }

        if(thisSize > otherSize)
        {
            return 1;
        }

        return 0;
    }