1 27 package org.htmlparser.filters; 28 29 import org.htmlparser.Node; 30 import org.htmlparser.NodeFilter; 31 32 35 public class NotFilter implements NodeFilter 36 { 37 40 protected NodeFilter mPredicate; 41 42 48 public NotFilter () 49 { 50 setPredicate (null); 51 } 52 53 57 public NotFilter (NodeFilter predicate) 58 { 59 setPredicate (predicate); 60 } 61 62 66 public NodeFilter getPredicate () 67 { 68 return (mPredicate); 69 } 70 71 75 public void setPredicate (NodeFilter predicate) 76 { 77 mPredicate = predicate; 78 } 79 80 84 88 public boolean accept (Node node) 89 { 90 return ((null != mPredicate) && !mPredicate.accept (node)); 91 } 92 } 93 | Popular Tags |