View Javadoc

1   package org.kuali.common.util.ignore;
2   
3   import org.apache.commons.lang3.StringUtils;
4   
5   public class PrefixSuffixIgnorer implements Ignore {
6   
7   	String prefix;
8   	String suffix;
9   
10  	public PrefixSuffixIgnorer() {
11  		this(null, null);
12  	}
13  
14  	public PrefixSuffixIgnorer(String prefix, String suffix) {
15  		super();
16  		this.prefix = prefix;
17  		this.suffix = suffix;
18  	}
19  
20  	@Override
21  	public boolean ignore(String line) {
22  		return StringUtils.startsWith(line, prefix) && StringUtils.endsWith(line, suffix);
23  	}
24  
25  	public String getPrefix() {
26  		return prefix;
27  	}
28  
29  	public void setPrefix(String prefix) {
30  		this.prefix = prefix;
31  	}
32  
33  	public String getSuffix() {
34  		return suffix;
35  	}
36  
37  	public void setSuffix(String suffix) {
38  		this.suffix = suffix;
39  	}
40  
41  }