001    package org.shiftone.jrat.util.regex;
002    
003    
004    import org.shiftone.jrat.util.log.Logger;
005    
006    
007    /**
008     * @author jeff@shiftone.org (Jeff Drost)
009     */
010    public class ConstantMatcher implements Matcher {
011    
012        private static final Logger LOG = Logger.getLogger(ConstantMatcher.class);
013        public static final Matcher ALL = new ConstantMatcher(true);
014        public static final Matcher NONE = new ConstantMatcher(false);
015        private boolean match;
016    
017        private ConstantMatcher(boolean match) {
018            this.match = match;
019        }
020    
021    
022        public boolean isMatch(String inputString) {
023            return match;
024        }
025    
026    
027        public String toString() {
028    
029            return match
030                    ? "<All/>"
031                    : "<None/>";
032        }
033    }