com.venky.parse.character.Exclude Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of common Show documentation
Show all versions of common Show documentation
Commonly used programming tasks in java
package com.venky.parse.character;
import java.util.ArrayList;
import java.util.Collection;
public class Exclude extends AbstractSingleCharacterRule{
Collection exclude = null;
public Exclude(char... exclude){
this.exclude = new ArrayList();
for (int i = 0 ; i < exclude.length ; i++){
this.exclude.add(exclude[i]);
}
}
public Exclude(Collection exclude){
this.exclude = exclude;
}
@Override
protected boolean match(char c) {
return !this.exclude.contains(c);
}
}