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

How to use
isMap
method
in
js.util.Types

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

origin: com.js-lib/js-commons

/**
 * Test if instance is a map. If instance to test is not null delegates {@link #isMap(Type)}; otherwise returns false.
 * 
 * @param o instance to test, possible null.
 * @return true if instance is a map; returns false if instance to test is null.
 */
public static boolean isMap(Object o)
{
 return o != null && Types.isMap(o.getClass());
}
origin: com.js-lib/js-xhtml-template

/**
 * Retrieve content map instance. Delegates {@link #getValue(Object, String)} to obtain the requested value. If value is
 * null warn the event an return empty map. If value is map return it, otherwise throws context exception.
 * 
 * @param scope scope object,
 * @param propertyPath object property path.
 * @return map instance, possible empty.
 * @throws TemplateException if requested value is undefined or not a {@link Types#isMap(Object) map}.
 */
Map<?, ?> getMap(Object scope, String propertyPath) throws TemplateException {
  Object map = getValue(scope, propertyPath);
  if (map == null) {
    warn(scope.getClass(), propertyPath);
    return Collections.EMPTY_MAP;
  }
  if (!Types.isMap(map)) {
    throw new TemplateException("Invalid type. Expected map but got |%s|.", map.getClass());
  }
  return (Map<?, ?>) map;
}
origin: com.js-lib/js-commons

 return ((Collection<?>)o).isEmpty();
if(isMap(o)) {
 return ((Map<?, ?>)o).isEmpty();
origin: com.js-lib/js-commons

 return newCollection(rawClass);
if(Types.isMap(rawClass)) {
 return newMap(rawClass);
origin: com.js-lib/js-commons

 return ((Collection<?>)o).size() > 0;
if(isMap(o)) {
 return ((Map<?, ?>)o).size() > 0;
origin: com.js-lib/tiny-container

/**
 * Test if method formal parameters designates a strict object, that is, is not primitive, array, collection or map.
 * 
 * @param formalParameters method formal parameters list.
 * @return true if formal parameters designates a strict object.
 */
private static boolean isObject(Type[] formalParameters) {
  if (formalParameters.length != 1) {
    return false;
  }
  final Type type = formalParameters[0];
  if (!(type instanceof Class)) {
    return false;
  }
  if (Types.isPrimitive(type)) {
    return false;
  }
  if (Types.isArrayLike(type)) {
    return false;
  }
  if (Types.isMap(type)) {
    return false;
  }
  if (ConverterRegistry.hasType(type)) {
    return false;
  }
  return true;
}
origin: com.js-lib/js-json

if (Types.isMap(value)) {
  serializeMap(value);
  return;
origin: com.js-lib/js-json

  return new PrimitiveValue(converter, (Class<?>) type);
if (Types.isMap(type)) {
  return new MapValue(converter, type);
js.utilTypesisMap

Javadoc

Test if instance is a map. If instance to test is not null delegates #isMap(Type); otherwise returns false.

Popular methods of Types

  • isArrayLike
    Test if type is array like, that is, array or collection. Uses #isArray(Type) and #isCollection(Type
  • isBoolean
    Test if type is a boolean primitive or boxing class.
  • 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)
  • Top 12 Jupyter Notebook extensions
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