1 16 package org.apache.commons.collections.functors; 17 18 import java.io.Serializable ; 19 20 import org.apache.commons.collections.Predicate; 21 22 30 public final class NotNullPredicate implements Predicate, Serializable { 31 32 33 static final long serialVersionUID = 7533784454832764388L; 34 35 36 public static final Predicate INSTANCE = new NotNullPredicate(); 37 38 44 public static Predicate getInstance() { 45 return INSTANCE; 46 } 47 48 51 private NotNullPredicate() { 52 super(); 53 } 54 55 61 public boolean evaluate(Object object) { 62 return (object != null); 63 } 64 65 } 66 | Popular Tags |