Revert "[enhancement] 支持Float类型"

This reverts commit 4ccb44ee2694c1b0b514985465335d77be1fdb63.
This commit is contained in:
VampireAchao 2023-03-15 09:59:53 +08:00
parent 8efe8fb2fd
commit 2919749c8f
2 changed files with 1 additions and 5 deletions

View File

@ -18,7 +18,7 @@ public class BooleanUtil {
/** 表示为假的字符串 */ /** 表示为假的字符串 */
private static final Set<String> FALSE_SET = SetUtil.of("false", "no", "n", "f", "0", "off", "", "", "", "", "×"); private static final Set<String> FALSE_SET = SetUtil.of("false", "no", "n", "f", "0", "off", "", "", "", "", "×");
/** js中表示假值Falsy的部分值 false、0、-0、0n、""、null、undefined 和 NaN */ /** js中表示假值Falsy的部分值 false、0、-0、0n、""、null、undefined 和 NaN */
public static final Set<Object> FALSY_SET = SetUtil.of(false, 0, -0, 0L, 0.0D, -0.0D, 0.0F, -0.0F, "", null); public static final Set<Object> FALSY_SET = SetUtil.of(false, 0, -0, 0L, 0.0D, -0.0D, "", null);
/** /**
* 取相反值 * 取相反值

View File

@ -105,9 +105,6 @@ public class BooleanUtilTest {
Assert.assertTrue(BooleanUtil.isJsFalsy(0.0D)); Assert.assertTrue(BooleanUtil.isJsFalsy(0.0D));
Assert.assertTrue(BooleanUtil.isJsFalsy(0.00D)); Assert.assertTrue(BooleanUtil.isJsFalsy(0.00D));
Assert.assertTrue(BooleanUtil.isJsFalsy(-0.00D)); Assert.assertTrue(BooleanUtil.isJsFalsy(-0.00D));
Assert.assertTrue(BooleanUtil.isJsFalsy(0.0F));
Assert.assertTrue(BooleanUtil.isJsFalsy(0.00F));
Assert.assertTrue(BooleanUtil.isJsFalsy(-0.00F));
Assert.assertTrue(BooleanUtil.isJsFalsy("")); Assert.assertTrue(BooleanUtil.isJsFalsy(""));
Assert.assertTrue(BooleanUtil.isJsFalsy(null)); Assert.assertTrue(BooleanUtil.isJsFalsy(null));
} }
@ -123,6 +120,5 @@ public class BooleanUtilTest {
Assert.assertTrue(BooleanUtil.isJsTruthy(1L)); Assert.assertTrue(BooleanUtil.isJsTruthy(1L));
Assert.assertTrue(BooleanUtil.isJsTruthy(0.1D)); Assert.assertTrue(BooleanUtil.isJsTruthy(0.1D));
Assert.assertTrue(BooleanUtil.isJsTruthy(-0.01D)); Assert.assertTrue(BooleanUtil.isJsTruthy(-0.01D));
Assert.assertTrue(BooleanUtil.isJsTruthy(-0.01F));
} }
} }