int stripeForObject(Object o) {
        if (o == null)
            return 0;
        Integer sh = null;
        if (shiftsForClasses != null) {
            Class<?> cl = o.getClass();
            while (cl != Object.class && (sh = shiftsForClasses.get(cl)) == null)
                cl = cl.getSuperclass();
        }
        if (sh == null)
            sh = 0;
        return sh + (o.hashCode() & mask);
    }