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

org.daisy.dotify.impl.text.EnglishInteger2TextFactoryService Maven / Gradle / Ivy

There is a newer version: 5.0.0
Show newest version
package org.daisy.dotify.impl.text;

import java.util.ArrayList;
import java.util.Collection;
import java.util.List;

import org.daisy.dotify.api.text.Integer2TextFactory;
import org.daisy.dotify.api.text.Integer2TextFactoryService;

import aQute.bnd.annotation.component.Component;

@Component
public class EnglishInteger2TextFactoryService implements
		Integer2TextFactoryService {
	
	private final static List locales;
	static {
		locales = new ArrayList();
		locales.add("en");
	}

	public boolean supportsLocale(String locale) {
		for (String l : locales) {
			if (l.equalsIgnoreCase(locale)) {
				return true;
			}
		}
		return false;
	}

	public Integer2TextFactory newFactory() {
		return new EnglishInteger2TextFactory();
	}

	public Collection listLocales() {
		return locales;
	}

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy