
org.opentripplanner.framework.i18n.I18NStringMapper Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of otp Show documentation
Show all versions of otp Show documentation
The OpenTripPlanner multimodal journey planning system
The newest version!
package org.opentripplanner.framework.i18n;
import java.util.Locale;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
public class I18NStringMapper {
private final Locale locale;
public I18NStringMapper(Locale locale) {
this.locale = locale;
}
@Nullable
public String mapToApi(I18NString string) {
return string == null ? null : string.toString(locale);
}
@Nonnull
public String mapNonnullToApi(I18NString string) {
return string.toString(locale);
}
@Nullable
public static String mapToApi(I18NString string, Locale locale) {
return string == null ? null : string.toString(locale);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy