Codota Logo
Types.isCollection
Code IndexAdd Codota to your IDE (free)

How to use
isCollection
method
in
js.util.Types

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

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
SimpleDateFormat s =
  • Codota IconString pattern;new SimpleDateFormat(pattern)
  • Codota IconString template;Locale locale;new SimpleDateFormat(template, locale)
  • Codota Iconnew SimpleDateFormat()
  • Smart code suggestions by Codota
}
origin: com.js-lib/js-commons

/**
 * Test if instance is a collection. If instance to test is not null delegates {@link #isCollection(Type)}; otherwise
 * return false.
 * 
 * @param o instance to test, possible null in which case returns false.
 * @return true if instance is collection; returns false if instance to test is null.
 */
public static boolean isCollection(Object o)
{
 // TODO: what about o instanceof Collection ?
 return o != null && isCollection(o.getClass());
}
origin: com.js-lib/js-commons

/**
 * Test if type is array like, that is, array or collection. Uses {@link #isArray(Type)} and
 * {@link #isCollection(Type)}.
 * 
 * @param t type to test.
 * @return true if type is array like.
 */
public static boolean isArrayLike(Type t)
{
 return isArray(t) || isCollection(t);
}
origin: com.js-lib/js-commons

if(isCollection(o)) {
 return (Iterable<?>)o;
origin: com.js-lib/js-commons

 return new Date();
if(Types.isCollection(t)) {
 return Classes.newCollection(t);
origin: com.js-lib/js-commons

else if(Types.isCollection(type)) {
 Class<?> componentType = (Class<?>)((ParameterizedType)field.getGenericType()).getActualTypeArguments()[0];
 instance = newCollection(type);
origin: com.js-lib/js-commons

 return Array.getLength(o) > 0;
if(isCollection(o)) {
 return ((Collection<?>)o).size() > 0;
origin: com.js-lib/js-commons

 return Array.getLength(o) == 0;
if(isCollection(o)) {
 return ((Collection<?>)o).isEmpty();
origin: com.js-lib/js-commons

if(Types.isCollection(rawClass)) {
 return newCollection(rawClass);
origin: com.js-lib/js-json

  return new ArrayValue(converter, type);
if (Types.isCollection(type)) {
  return new CollectionValue(converter, type);
js.utilTypesisCollection

Javadoc

Test if instance is a collection. If instance to test is not null delegates #isCollection(Type); otherwise return false.

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
  • 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
  • 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

  • Finding current android device location
  • setRequestProperty (URLConnection)
  • requestLocationUpdates (LocationManager)
  • getResourceAsStream (ClassLoader)
    Returns a stream for the resource with the specified name. See #getResource(String) for a descriptio
  • Arrays (java.util)
    This class contains various methods for manipulating arrays (such as sorting and searching). This cl
  • Dictionary (java.util)
    The Dictionary class is the abstract parent of any class, such as Hashtable, which maps keys to valu
  • Executor (java.util.concurrent)
    An object that executes submitted Runnable tasks. This interface provides a way of decoupling task s
  • XPath (javax.xml.xpath)
    XPath provides access to the XPath evaluation environment and expressions. Evaluation of XPath Expr
  • IsNull (org.hamcrest.core)
    Is the value null?
  • LoggerFactory (org.slf4j)
    The LoggerFactory is a utility class producing Loggers for various logging APIs, most notably for lo
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now