Tabnine Logo
Types.isBoolean
Code IndexAdd Tabnine to your IDE (free)

How to use
isBoolean
method
in
js.util.Types

Best Java code snippets using js.util.Types.isBoolean (Showing top 8 results out of 315)

origin: com.js-lib/js-commons

/**
 * Test if object instance is a boolean, primitive or boxing class. Returns true if given object is primitive boolean
 * or {@link Boolean} instance or false otherwise. Return also false if object is null.
 * 
 * @param o object instance, possible null.
 * @return true if instance to test is boolean.
 */
public static boolean isBoolean(Object o)
{
 return o != null && isBoolean(o.getClass());
}
origin: com.js-lib/js-xhtml-template

  /**
   * Check operand format compatibility against value counterpart.
   * 
   * @param value content value to validate operand against,
   * @param operand formatted string operand.
   * @return true if <code>operand</code> format is compatible with requested <code>value</code>.
   */
  public static boolean isValid(Object value, String operand) {
    if (operand == null) {
      // validation is enacted only for operator processors that do not accept null operand
      // so always return false
      return false;
    }
    if (Types.isBoolean(value)) {
      return BOOLEAN_PATTERN.matcher(operand).matches();
    }
    if (Types.isNumber(value)) {
      return NUMBER_PATTERN.matcher(operand).matches();
    }
    if (Types.isDate(value)) {
      return DATE_PATTERN.matcher(operand).matches();
    }
    return true;
  }
}
origin: com.js-lib/js-commons

if(Types.isBoolean(t)) {
 return Boolean.valueOf(false);
origin: com.js-lib/js-xhtml-template

if (Types.isBoolean(value)) {
  return value.toString().toLowerCase();
origin: com.js-lib/js-commons

 return false;
if(isBoolean(o)) {
 return (Boolean)o;
origin: com.js-lib/js-commons

 return true;
if(isBoolean(o)) {
 return (Boolean)o == false;
origin: com.js-lib/js-commons

/**
 * Test if type is like a primitive? Return true only if given type is a number, boolean, enumeration, character or
 * string.
 * 
 * @param t type to test.
 * @return true if this type is like a primitive.
 */
public static boolean isPrimitiveLike(Type t)
{
 if(isNumber(t)) {
  return true;
 }
 if(isBoolean(t)) {
  return true;
 }
 if(isEnum(t)) {
  return true;
 }
 if(isCharacter(t)) {
  return true;
 }
 if(isDate(t)) {
  return true;
 }
 if(t == String.class) {
  return true;
 }
 return false;
}
origin: com.js-lib/js-json

if (Types.isBoolean(value)) {
  write(converter.asString(value));
  return;
js.utilTypesisBoolean

Javadoc

Test if object instance is a boolean, primitive or boxing class. Returns true if given object is primitive boolean or Boolean instance or false otherwise. Return also false if object is null.

Popular methods of Types

  • isArrayLike
    Test if type is array like, that is, array or collection. Uses #isArray(Type) and #isCollection(Type
  • isMap
    Test if type is map. Returns true if type implements, directly or through inheritance, Map interface
  • isKindOf
    Determine if a given type is a kind of one of the requested types to match. Traverses typesToMatch a
  • isNumber
    Test if type is numeric. A type is considered numeric if is a Java standard class representing a num
  • isPrimitiveLike
    Test if type is like a primitive? Return true only if given type is a number, boolean, enumeration,
  • asIterable
    Convert object instance to iterable. If object instance is an array or a collection returns an itera
  • isArray
    Test if type is array. If type is a class return Class#isArray() predicate value; otherwise test if
  • isCollection
    Test if type is collection. Returns true if type implements, directly or through inheritance, Collec
  • isDate
    Test if type is a calendar date.
  • isEnum
    Test if type is enumeration. This predicate delegates Class#isEnum() if type is a class. If not, ret
  • isInstanceOf
    Test if object instance is not null and extends or implements expected type. This predicate consider
  • isPrimitive
    Test if type is primitive. Primitive types are those considered so by Class#isPrimitive().
  • isInstanceOf,
  • isPrimitive,
  • isVoid,
  • asBoolean,
  • equalsAny,
  • getEmptyValue,
  • isCharacter,
  • isConcrete,
  • isEqual

Popular in Java

  • Start an intent from android
  • scheduleAtFixedRate (ScheduledExecutorService)
  • startActivity (Activity)
  • getSharedPreferences (Context)
  • GridLayout (java.awt)
    The GridLayout class is a layout manager that lays out a container's components in a rectangular gri
  • EOFException (java.io)
    Thrown when a program encounters the end of a file or stream during an input operation.
  • FileInputStream (java.io)
    An input stream that reads bytes from a file. File file = ...finally if (in != null) in.clos
  • Selector (java.nio.channels)
    A controller for the selection of SelectableChannel objects. Selectable channels can be registered w
  • NumberFormat (java.text)
    The abstract base class for all number formats. This class provides the interface for formatting and
  • JTable (javax.swing)
  • From CI to AI: The AI layer in your organization
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now