private int compareValue(Object v1, Object v2) {

        if (v1 instanceof Integer)
            return Integer.compare((Integer) v1, (Integer) v2);

        if (v1 instanceof Float)
            return Float.compare((Float) v1, (Float) v2);

        if (v1 instanceof Double)
            return Double.compare((Double) v1, (Double) v2);

        if (v1 instanceof Long)
            return Long.compare((Long) v1, (Long) v2);

        if (v1 instanceof Character)
            return Character.compare((Character) v1, (Character) v2);

        if (v1 instanceof Short)
            return Short.compare((Short) v1, (Short) v2);

        return 0;
    }
private int compareValue(Object v1, Object v2) {

        if (v1 instanceof Integer)
            return Integer.compare((Integer) v1, (Integer) v2);

        if (v1 instanceof Float)
            return Float.compare((Float) v1, (Float) v2);

        if (v1 instanceof Double)
            return Double.compare((Double) v1, (Double) v2);

        if (v1 instanceof Long)
            return Long.compare((Long) v1, (Long) v2);

        if (v1 instanceof Character)
            return Character.compare((Character) v1, (Character) v2);

        if (v1 instanceof Short)
            return Short.compare((Short) v1, (Short) v2);

        return 0;
    }
private int compareValue ( Object v1 , Object v2 ) { if ( v1 instanceof Integer ) return Integer . compare ( ( Integer ) v1 , ( Integer ) v2 ) ; if ( v1 instanceof Float ) return Float . compare ( ( Float ) v1 , ( Float ) v2 ) ; if ( v1 instanceof Double ) return Double . compare ( ( Double ) v1 , ( Double ) v2 ) ; if ( v1 instanceof Long ) return Long . compare ( ( Long ) v1 , ( Long ) v2 ) ; if ( v1 instanceof Character ) return Character . compare ( ( Character ) v1 , ( Character ) v2 ) ; if ( v1 instanceof Short ) return Short . compare ( ( Short ) v1 , ( Short ) v2 ) ; return 0 ; }
对键值对中值进行比较,只针对6种基本类型，short int long float double char,
其他一律返回相等

@param v1
值1
@param v2
值2
@return 比较结果
对键值对中值进行比较 只针对6种基本类型，short int long float double char 其他一律返回相等