Interface IHasDisplayTextWithArgs

All Superinterfaces:
IHasDisplayText
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 IHasDisplayTextWithArgs extends IHasDisplayText
Base interface for objects that have a locale dependent display name.
Author:
Philip Helger
  • Method Details

    • getDisplayTextWithArgs

      @Nullable @Deprecated(forRemoval=false) @DevelopersNote("Use getDisplayText (Locale) instead") default String getDisplayTextWithArgs(@Nonnull Locale aContentLocale)
      Deprecated.
      Don't call this; Use IHasDisplayText.getDisplayText(Locale) if no parameters are present
      Parameters:
      aContentLocale - The locale to be used for resolving. May not be null.
      Returns:
      The display text of the object in the given locale. May be null if the text could not be resolved in the passed locale.
    • getDisplayTextWithArgs

      @Nullable default String getDisplayTextWithArgs(@Nonnull Locale aContentLocale, @Nullable Object... aArgs)
      Parameters:
      aContentLocale - The locale to be used for resolving. May not be null.
      aArgs - Arguments for formatting the provided text. May be null but this makes no sense.
      Returns:
      The display text of the object in the given locale. May be null if the text could not be resolved in the passed locale.
    • getAsHasTextWithArgs

      @Nonnull default IHasTextWithArgs getAsHasTextWithArgs()
      Returns:
      this as an instance of IHasTextWithArgs.
      Since:
      8.5.2