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

com.softicar.platform.common.ui.wiki.token.matcher.WikiTokenMatcherList Maven / Gradle / Ivy

Go to download

The SoftiCAR Platform is a lightweight, Java-based library to create interactive business web applications.

There is a newer version: 50.0.0
Show newest version
package com.softicar.platform.common.ui.wiki.token.matcher;

import com.softicar.platform.common.ui.wiki.tokenizer.IWikiTokenizer;
import java.util.ArrayList;

public class WikiTokenMatcherList implements IWikiTokenMatcher {

	private final ArrayList matchers;

	public WikiTokenMatcherList() {

		this.matchers = new ArrayList<>();
	}

	public WikiTokenMatcherList addMatcher(IWikiTokenMatcher matcher) {

		matchers.add(matcher);
		return this;
	}

	@Override
	public boolean match(IWikiTokenizer tokenizer) {

		for (IWikiTokenMatcher matcher: matchers) {
			if (matcher.match(tokenizer)) {
				return true;
			}
		}
		return false;
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy