int mods = compareMods(o1.toString().charAt(0), o2.toString().charAt(0));
int mods = 0; try{ mods = compareMods(o1.toString().charAt(0), o2.toString().charAt(0)); } catch(StringIndexOutOfBoundsException saoobE){ mods = 0; }
        public int compare(Object o1, Object o2) {            if (o1.getClass()==String.class && o2.getClass()==String.class){                int mods = compareMods(o1.toString().charAt(0), o2.toString().charAt(0));                if (mods != 0){                    return mods;                }                else{                    return ( (String) o1).compareToIgnoreCase( (String) o2);                }            }            else{                if (o1.hashCode()==o2.hashCode()){                    return 0;                }                else if (o1.hashCode()<=o2.hashCode()){                    return -1;                }                else{                    return 1;                }            }        }