Class TypeConversion
java.lang.Object
com.github.basking2.sdsai.itrex.util.TypeConversion
Standard ways to convert between types.
-
Constructor Summary
-
Method Summary
-
Constructor Details
-
TypeConversion
public TypeConversion()
-
-
Method Details
-
toString
-
toInt
-
toFloat
-
toLong
-
toDouble
-
toBoolean
Convert the parameter o to a boolean using its truthy or falsey ness.- Null is false.
- The strings "false", "0", "no", "f", and "off" all result in a false value.
- Everything not listed above results in true.
- Parameters:
o
- The object to convert to a boolean.- Returns:
- The boolean value of
o
.
-