Tabnine Logo
HumanReadableText.getParameters
Code IndexAdd Tabnine to your IDE (free)

How to use
getParameters
method
in
org.apache.james.imap.api.display.HumanReadableText

Best Java code snippets using org.apache.james.imap.api.display.HumanReadableText.getParameters (Showing top 2 results out of 315)

origin: org.apache.james.protocols/protocols-imap

@Override
public String localize(HumanReadableText text, Locales locales) {
  
  String result;
  if (text == null) {
    result = null;
  } else {
    //FIXME implement the locale selection
    final Locale chosenLocale = Locale.US;
    //FIXME implement the localized value lookup depending on chosenLocale
    result = text.getDefaultValue();
    
    Object[] params = text.getParameters();
    if (params != null && params.length > 0) {
      MessageFormat messageFormat = new MessageFormat(result, chosenLocale);
      result = messageFormat.format(params);
    }
  }
  return result;
}
origin: org.apache.james/apache-james-imap-message

/**
 * @see Localizer#localize(HumanReadableText, Locales)
 */
public String localize(HumanReadableText text, Locales locales) {
  
  String result;
  if (text == null) {
    result = null;
  } else {
    //FIXME implement the locale selection
    final Locale chosenLocale = Locale.US;
    //FIXME implement the localized value lookup depending on chosenLocale
    result = text.getDefaultValue();
    
    Object[] params = text.getParameters();
    if (params != null && params.length > 0) {
      MessageFormat messageFormat = new MessageFormat(result, chosenLocale);
      result = messageFormat.format(params);
    }
  }
  return result;
}
org.apache.james.imap.api.displayHumanReadableTextgetParameters

Javadoc

Gets parameters that may be substituted into the text.

Popular methods of HumanReadableText

  • <init>
  • getDefaultValue
    Gets the default value for this text.
  • permanentFlags
  • unseen
  • getKey
    Gets a unique key that can be used to loopup the text. How this is performed is implementation indep
  • toString

Popular in Java

  • Finding current android device location
  • scheduleAtFixedRate (ScheduledExecutorService)
  • getResourceAsStream (ClassLoader)
  • requestLocationUpdates (LocationManager)
  • Rectangle (java.awt)
    A Rectangle specifies an area in a coordinate space that is enclosed by the Rectangle object's top-
  • Thread (java.lang)
    A thread is a thread of execution in a program. The Java Virtual Machine allows an application to ha
  • NoSuchElementException (java.util)
    Thrown when trying to retrieve an element past the end of an Enumeration or Iterator.
  • TimerTask (java.util)
    The TimerTask class represents a task to run at a specified time. The task may be run once or repeat
  • Collectors (java.util.stream)
  • Loader (org.hibernate.loader)
    Abstract superclass of object loading (and querying) strategies. This class implements useful common
  • Top plugins for WebStorm
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now