public class Eval extends Object
Evaluate an object and return boolean value by convention
| Modifier and Type | Method and Description |
|---|---|
static boolean |
eval(boolean b)
return the specified boolean directly
|
static boolean |
eval(Boolean b) |
static boolean |
eval(byte b)
return
true if the specified byte b != 0 |
static boolean |
eval(Byte b) |
static boolean |
eval(char c)
return
true if the specified char c != 0 |
static boolean |
eval(Character c) |
static boolean |
eval(Collection c)
Return
true if the collection is not empty |
static boolean |
eval(double d)
return
true if the specified double Math.abs(f) > 0.00000001 |
static boolean |
eval(Double d) |
static boolean |
eval(float f)
return
true if the specified float Math.abs(f) > 0.00000001 |
static boolean |
eval(Float f) |
static boolean |
eval(int n)
return
true if the specified integer n != 0 |
static boolean |
eval(long l)
return
true if the specified long l != 0 |
static boolean |
eval(Map m)
Return
true if the map is not empty |
static boolean |
eval(Number n)
Evaluate the number’s int value
|
static boolean |
eval(Object condition)
General object type evaluation.
|
static boolean |
eval(String s)
Return true if the specified string does not equals, ignore case, to “false” or “no”
|
static Locale |
locale(Locale locale)
Eval Locale from a Locale
|
static Locale |
locale(String language)
Eval locale from language string
|
static Locale |
locale(String language,
String region)
Eval locale from language and region
|
static Locale |
locale(String language,
String region,
String variant)
Eval locale from language, region and variant
|
public static boolean eval(byte b)
return true if the specified byte b != 0
b - public static boolean eval(char c)
return true if the specified char c != 0
c - public static boolean eval(boolean b)
return the specified boolean directly
b - public static boolean eval(int n)
return true if the specified integer n != 0
n - public static boolean eval(long l)
return true if the specified long l != 0
l - public static boolean eval(float f)
return true if the specified float Math.abs(f) > 0.00000001
f - public static boolean eval(double d)
return true if the specified double Math.abs(f) > 0.00000001
d - public static boolean eval(String s)
Return true if the specified string does not equals, ignore case, to “false” or “no”
s - public static boolean eval(Collection c)
Return true if the collection is not empty
c - public static boolean eval(Map m)
Return true if the map is not empty
m - public static boolean eval(Byte b)
b - eval(boolean)public static boolean eval(Boolean b)
b - eval(boolean)public static boolean eval(Character c)
c - eval(char)public static boolean eval(Float f)
f - eval(float)public static boolean eval(Double d)
d - eval(double)public static boolean eval(Number n)
Evaluate the number’s int value
n - eval(int)public static boolean eval(Object condition)
General object type evaluation.
false if the object instance is nullfalse if the object instance is an empty Collection or MapNumber.intValue() to evaluatecondition - public static Locale locale(Locale locale)
Eval Locale from a Locale
locale - public static Locale locale(String language)
Eval locale from language string
language - public static Locale locale(String language, String region)
Eval locale from language and region
language - region - Copyright © 2017–2021 OSGL (Open Source General Library). All rights reserved.