![JAR search and dependency download from the Maven repository](/logo.png)
org.leadpony.justify.api.Localizable Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of justify Show documentation
Show all versions of justify Show documentation
Justify is a JSON validator based on the JSON Schema specification
and the JSON Processing API.
/*
* Copyright 2018-2019 the Justify authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.leadpony.justify.api;
import java.util.Locale;
/**
* A localizable string.
*
* @author leadpony
*/
@FunctionalInterface
public interface Localizable {
/**
* Returns the string localized for the current locale.
* @return the localized string, never be {@code null}.
*/
default String getLocalized() {
return getLocalized(Locale.getDefault());
}
/**
* Returns the string localized for the specified locale.
* @param locale the locale for which the source string to be localized.
* This cannot be {@code null}.
* @return the localized string, never be {@code null}.
* @throws NullPointerException if the specified {@code locale} is {@code null}.
*/
String getLocalized(Locale locale);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy