1 28 package de.nava.informa.utils.cleaner; 29 30 import de.nava.informa.core.ChannelIF; 31 import de.nava.informa.core.ItemIF; 32 33 import java.util.List ; 34 import java.util.Vector ; 35 36 43 class CompositeMatcher implements CleanerMatcherIF { 44 private List matchers = new Vector (); 45 46 53 public boolean isMatching(ItemIF item, ChannelIF channel) { 54 boolean matching = false; 55 56 final int size = matchers.size(); 57 for (int i = 0; i < size && !matching; i++) { 58 CleanerMatcherIF matcher = (CleanerMatcherIF) matchers.get(i); 59 matching = matcher.isMatching(item, channel); 60 } 61 62 return matching; 63 } 64 65 70 public void add(CleanerMatcherIF m) { 71 if (!matchers.contains(m)) { 72 matchers.add(m); 73 } 74 } 75 76 81 public void remove(CleanerMatcherIF m) { 82 matchers.remove(m); 83 } 84 } 85 | Popular Tags |