Java tutorial
//package com.java2s; import java.util.Collection; public class Main { public static boolean contains(Collection col, Object obj) { return ((obj != null && col != null) ? col.contains(obj) : false); } }