We use cookies to serve our customers and website visitors in the best possible way. Cookies are used for the proper functioning of the website and for improving the user experience, monitoring visitor traffic and marketing purposes. By continuing to browse the site, you agree to our use of cookies. You can read more about cookies here.
com.vaadin.flow.internal.
Class JavaScriptSemantics
- java.lang.Object
-
- com.vaadin.flow.internal.JavaScriptSemantics
-
public class JavaScriptSemantics extends Object
Helpers for replicating JavaScript semantics in Java.
For internal use only. May be renamed or removed in a future release.
Since:
1.0
Author:
Vaadin Ltd
-
-
Method Detail
-
isTrueish
public static boolean isTrueish​(Object value)
Gets the boolean value of the provided value:
null
isfalse
.- String values are
true
, except for the empty string. - Numerical values are
true
, except for 0 andNaN
. - JSON object and JSON array values are always
true
.
Parameters:
value
- the value to check for truthnessReturns:
true
if the provided value is trueish according to JavaScript semantics, otherwisefalse
-
-