com.anrisoftware.resources.texts.api.TextsMap Maven / Gradle / Ivy
/*
* Copyright 2012-2016 Erwin Müller
*
* This file is part of resources-texts.
*
* resources-texts is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
*
* resources-texts is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with resources-texts. If not, see .
*/
package com.anrisoftware.resources.texts.api;
/**
* Puts text resources and retrieves them. The text resources are identified by
* their name and locale. Duplicate entries are discarded.
*
* @author Erwin Mueller, [email protected]
* @since 1.1
*/
public interface TextsMap {
/**
* Adds a new text resource to the map. Already added text resource with the
* name are discarded.
*
* @param name
* the name of the resource.
*
* @param text
* the {@link TextResource} to add.
*/
void putText(String name, TextResource text);
/**
* Returns the text resource with the name.
*
* @param name
* the name of the resource.
*
* @return the {@link TextResource} with the name and language, the resource
* with the default language, or null.
*/
TextResource getText(String name);
/**
* Check if the map contains a text with the name.
*
* @param name
* the name of the text.
*
* @return true if the map contains the text or
* false if not.
*/
boolean haveText(String name);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy