Here you can find the source of isCollection(final Object collection)
Parameter | Description |
---|---|
collection | the collection to be tested. |
public static boolean isCollection(final Object collection)
//package com.java2s; //License from project: Apache License import java.util.Collection; public class Main { /**//from w ww . j a v a 2 s . c om * Returns true if the collection is implements Collection; false otherwise. * * @param collection * the collection to be tested. * @return true if the collection is implements Collection; false otherwise. */ public static boolean isCollection(final Object collection) { return collection instanceof Collection; } }