|
|
@@ -23,7 +23,7 @@ public class BooleanUtil {
|
|
|
if (bool == null) {
|
|
|
return null;
|
|
|
}
|
|
|
- return bool.booleanValue() ? Boolean.FALSE : Boolean.TRUE;
|
|
|
+ return bool ? Boolean.FALSE : Boolean.TRUE;
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -99,7 +99,7 @@ public class BooleanUtil {
|
|
|
* @return Integer值
|
|
|
*/
|
|
|
public static Integer toInteger(boolean value) {
|
|
|
- return Integer.valueOf(toInt(value));
|
|
|
+ return toInt(value);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -119,7 +119,7 @@ public class BooleanUtil {
|
|
|
* @return Character值
|
|
|
*/
|
|
|
public static Character toCharacter(boolean value) {
|
|
|
- return Character.valueOf(toChar(value));
|
|
|
+ return toChar(value);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -139,7 +139,7 @@ public class BooleanUtil {
|
|
|
* @return Byte值
|
|
|
*/
|
|
|
public static Byte toByteObj(boolean value) {
|
|
|
- return Byte.valueOf(toByte(value));
|
|
|
+ return toByte(value);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -149,7 +149,7 @@ public class BooleanUtil {
|
|
|
* @return long值
|
|
|
*/
|
|
|
public static long toLong(boolean value) {
|
|
|
- return (long) toInt(value);
|
|
|
+ return toInt(value);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -159,7 +159,7 @@ public class BooleanUtil {
|
|
|
* @return Long值
|
|
|
*/
|
|
|
public static Long toLongObj(boolean value) {
|
|
|
- return Long.valueOf(toLong(value));
|
|
|
+ return toLong(value);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -179,7 +179,7 @@ public class BooleanUtil {
|
|
|
* @return Short值
|
|
|
*/
|
|
|
public static Short toShortObj(boolean value) {
|
|
|
- return Short.valueOf(toShort(value));
|
|
|
+ return toShort(value);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -199,7 +199,7 @@ public class BooleanUtil {
|
|
|
* @return float值
|
|
|
*/
|
|
|
public static Float toFloatObj(boolean value) {
|
|
|
- return Float.valueOf(toFloat(value));
|
|
|
+ return toFloat(value);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -209,7 +209,7 @@ public class BooleanUtil {
|
|
|
* @return double值
|
|
|
*/
|
|
|
public static double toDouble(boolean value) {
|
|
|
- return (double) toInt(value);
|
|
|
+ return toInt(value);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -219,7 +219,7 @@ public class BooleanUtil {
|
|
|
* @return double值
|
|
|
*/
|
|
|
public static Double toDoubleObj(boolean value) {
|
|
|
- return Double.valueOf(toDouble(value));
|
|
|
+ return toDouble(value);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -325,12 +325,12 @@ public class BooleanUtil {
|
|
|
* @param array {@code Boolean}数组
|
|
|
* @return 取与为真返回{@code true}
|
|
|
*/
|
|
|
- public static Boolean and(final Boolean... array) {
|
|
|
+ public static Boolean andOfWrap(Boolean... array) {
|
|
|
if (ArrayUtil.isEmpty(array)) {
|
|
|
throw new IllegalArgumentException("The Array must not be empty !");
|
|
|
}
|
|
|
final boolean[] primitive = Convert.convert(boolean[].class, array);
|
|
|
- return Boolean.valueOf(and(primitive));
|
|
|
+ return and(primitive);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -376,12 +376,12 @@ public class BooleanUtil {
|
|
|
* @param array {@code Boolean}数组
|
|
|
* @return 取或为真返回{@code true}
|
|
|
*/
|
|
|
- public static Boolean or(Boolean... array) {
|
|
|
+ public static Boolean orOfWrap(Boolean... array) {
|
|
|
if (ArrayUtil.isEmpty(array)) {
|
|
|
throw new IllegalArgumentException("The Array must not be empty !");
|
|
|
}
|
|
|
final boolean[] primitive = Convert.convert(boolean[].class, array);
|
|
|
- return Boolean.valueOf(or(primitive));
|
|
|
+ return or(primitive);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -424,12 +424,12 @@ public class BooleanUtil {
|
|
|
* @param array {@code Boolean} 数组
|
|
|
* @return 异或为真取{@code true}
|
|
|
*/
|
|
|
- public static Boolean xor(Boolean... array) {
|
|
|
+ public static Boolean xorOfWrap(Boolean... array) {
|
|
|
if (ArrayUtil.isEmpty(array)) {
|
|
|
throw new IllegalArgumentException("The Array must not be empty !");
|
|
|
}
|
|
|
final boolean[] primitive = Convert.convert(boolean[].class, array);
|
|
|
- return Boolean.valueOf(xor(primitive));
|
|
|
+ return xor(primitive);
|
|
|
}
|
|
|
|
|
|
/**
|