Interface IHasTextWithArgs

All Superinterfaces:
IHasText
All Known Subinterfaces:
IMultilingualText, IMutableMultilingualText
All Known Implementing Classes:
AbstractMapBasedMultilingualText, AbstractReadOnlyMapBasedMultilingualText, ConstantHasTextWithArgs, MultilingualText, ReadOnlyMultilingualText, ResourceBundleTextProvider
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface IHasTextWithArgs extends IHasText
Basic interface for object providing multilingual texts with and without arguments.
Author:
Philip Helger
  • Method Details

    • getTextWithArgs

      @Nullable @Deprecated(forRemoval=false) default String getTextWithArgs(@Nonnull Locale aContentLocale)
      Deprecated.
      Don't call this; Use IHasText.getText(Locale) instead!
      Get the text specific for the passed locale. The implementation class MAY add locale-generalisation when resolving the text ("de_DE" => "de" => default).
      Parameters:
      aContentLocale - The locale to use. May not be null.
      Returns:
      null if no text for the given locale was found.
    • getTextWithArgs

      @Nullable default String getTextWithArgs(@Nonnull Locale aContentLocale, @Nullable Object... aArgs)
      Get the text specific for the passed locale. The implementation class MAY add locale-generalisation when resolving the text ("de_DE" => "de" => default). The placeholders will be resolved with the Format.format(Object) method.
      Parameters:
      aContentLocale - The locale to use. May not be null.
      aArgs - The arguments to be added into the string. May be null but this makes no sense.
      Returns:
      null if no text for the given locale was found.
    • getAsHasDisplayTextWithArgs

      @Nonnull default IHasDisplayTextWithArgs getAsHasDisplayTextWithArgs()
      Returns:
      this as an instance of IHasDisplayTextWithArgs.
      Since:
      8.5.2