All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.venky.parse.character.AbstractSingleCharacterRule Maven / Gradle / Ivy

There is a newer version: 1.15
Show newest version
package com.venky.parse.character;

import com.venky.parse.Rule;


public abstract class AbstractSingleCharacterRule extends Rule {
	
	@Override
	public boolean match(String input, int offset) {
		if (offset >= input.length()) {
			return false;
		}
		char c = input.charAt(offset);
		boolean ret = match(c);
		if (ret){
			setMatch(new Element(this,String.valueOf(c)));
		}
		return ret;
	}
	protected abstract boolean match(char c);

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy