1 27 package ch.ethz.prose.filter; 28 import java.util.Collection ; 29 30 class ObjectInCollectionFilter extends ObjectFilter 31 { 32 Collection collection = null; 33 protected ObjectInCollectionFilter(int extrMethod, Collection col) 34 { 35 super(extrMethod); 37 38 if (collection == null) 40 throw new IllegalArgumentException ("Target/This.inCollection(): null argument"); 41 42 collection = col; 43 44 } 45 46 protected boolean doIsSpecialObject(Object target) 48 { 49 return collection.contains(target); 50 } 51 } 52 53 54 | Popular Tags |