fix comment

This commit is contained in:
Looly 2022-06-23 10:46:50 +08:00
parent 28ce133e4b
commit 26079dbb29
3 changed files with 11 additions and 12 deletions

View File

@ -23,7 +23,7 @@ public class CastUtil {
* @param value 被转换的对象 * @param value 被转换的对象
* @return 转换后的对象 * @return 转换后的对象
*/ */
public static <T> T castTo(Class<T> targetType, final Object value) { public static <T> T castTo(final Class<T> targetType, final Object value) {
return Assert.notNull(targetType).cast(value); return Assert.notNull(targetType).cast(value);
} }
@ -35,7 +35,7 @@ public class CastUtil {
* @return 转换后的集合 * @return 转换后的集合
*/ */
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
public static <T> Collection<T> castUp(Collection<? extends T> collection) { public static <T> Collection<T> castUp(final Collection<? extends T> collection) {
return (Collection<T>) collection; return (Collection<T>) collection;
} }
@ -47,7 +47,7 @@ public class CastUtil {
* @return 转换后的集合 * @return 转换后的集合
*/ */
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
public static <T> Collection<T> castDown(Collection<? super T> collection) { public static <T> Collection<T> castDown(final Collection<? super T> collection) {
return (Collection<T>) collection; return (Collection<T>) collection;
} }
@ -59,7 +59,7 @@ public class CastUtil {
* @return 泛化集合 * @return 泛化集合
*/ */
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
public static <T> Set<T> castUp(Set<? extends T> set) { public static <T> Set<T> castUp(final Set<? extends T> set) {
return (Set<T>) set; return (Set<T>) set;
} }
@ -71,7 +71,7 @@ public class CastUtil {
* @return 泛化集合 * @return 泛化集合
*/ */
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
public static <T> Set<T> castDown(Set<? super T> set) { public static <T> Set<T> castDown(final Set<? super T> set) {
return (Set<T>) set; return (Set<T>) set;
} }
@ -83,7 +83,7 @@ public class CastUtil {
* @return 泛化集合 * @return 泛化集合
*/ */
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
public static <T> List<T> castUp(List<? extends T> list) { public static <T> List<T> castUp(final List<? extends T> list) {
return (List<T>) list; return (List<T>) list;
} }
@ -95,7 +95,7 @@ public class CastUtil {
* @return 泛化集合 * @return 泛化集合
*/ */
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
public static <T> List<T> castDown(List<? super T> list) { public static <T> List<T> castDown(final List<? super T> list) {
return (List<T>) list; return (List<T>) list;
} }
@ -108,7 +108,7 @@ public class CastUtil {
* @return 泛化集合 * @return 泛化集合
*/ */
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
public static <K, V> Map<K, V> castUp(Map<? extends K, ? extends V> map) { public static <K, V> Map<K, V> castUp(final Map<? extends K, ? extends V> map) {
return (Map<K, V>) map; return (Map<K, V>) map;
} }
@ -121,7 +121,7 @@ public class CastUtil {
* @return 泛化集合 * @return 泛化集合
*/ */
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
public static <K, V> Map<K, V> castDown(Map<? super K, ? super V> map) { public static <K, V> Map<K, V> castDown(final Map<? super K, ? super V> map) {
return (Map<K, V>) map; return (Map<K, V>) map;
} }
} }

View File

@ -357,7 +357,6 @@ public class NumberChineseFormatter {
/** /**
* 把中文转换为数字 二百二十 220<br> * 把中文转换为数字 二百二十 220<br>
* https://www.d5.nz/read/sfdlq/text-part0000_split_030.html
* <ul> * <ul>
* <li>一百一十二 - 112</li> * <li>一百一十二 - 112</li>
* <li>一千零一十二 - 1012</li> * <li>一千零一十二 - 1012</li>

View File

@ -5,9 +5,9 @@ import cn.hutool.core.text.StrUtil;
/** /**
* 将浮点数类型的number转换成英语的表达方式 <br> * 将浮点数类型的number转换成英语的表达方式 <br>
* 参考博客http://blog.csdn.net/eric_sunah/article/details/8713226 * 参考博客<a href="http://blog.csdn.net/eric_sunah/article/details/8713226">http://blog.csdn.net/eric_sunah/article/details/8713226</a>
* *
* @author Looly,totalo * @author Looly, totalo
* @since 3.0.9 * @since 3.0.9
*/ */
public class NumberWordFormatter { public class NumberWordFormatter {