Java Message Format format(final String message, final Object... args)

Here you can find the source of format(final String message, final Object... args)

Description

format

License

Open Source License

Declaration

public static String format(final String message, final Object... args) 

Method Source Code


//package com.java2s;
/*//from  w  w w  .ja va  2s . co  m
 * Copyright 2000-2013 Enonic AS
 * http://www.enonic.com/license
 */

import java.text.MessageFormat;

public class Main {
    public static String format(final String message, final Object... args) {
        if (args == null || args.length == 0) {
            return message;
        } else {
            return MessageFormat.format(message, args);
        }
    }
}

Related

  1. format(final String template, final Object... arguments)
  2. format(ResourceBundle bundle, String key, Object... args)
  3. format(String activity, Object item, Long count, Long total)
  4. format(String key, Object... values)