
fr.vergne.translation.util.impl.MapFileNamer Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of translation-core Show documentation
Show all versions of translation-core Show documentation
Basic features to support a translation project.
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