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

fr.vergne.translation.util.impl.MapFileNamer Maven / Gradle / Ivy

The newest version!
package fr.vergne.translation.util.impl;

import java.io.File;

import fr.vergne.translation.TranslationMap;
import fr.vergne.translation.util.MapNamer;

/**
 * Simple {@link MapNamer} for file-based {@link TranslationMap}s IDs: the name
 * returned for a given {@link TranslationMap} is the name of the file it
 * corresponds to.
 * 
 * @author Matthieu VERGNE 
 * 
 */
public class MapFileNamer implements MapNamer {

	private final String name;
	private final String description;

	public MapFileNamer(String name, String description) {
		this.name = name;
		this.description = description;
	}

	@Override
	public String getName() {
		return name;
	}

	@Override
	public String getDescription() {
		return description;
	}

	@Override
	public String getNameFor(File file) {
		return file.getName();
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy