Java Message Format formats(String pattern, Object... args)

Here you can find the source of formats(String pattern, Object... args)

Description

formats

License

Open Source License

Declaration

public static String formats(String pattern, Object... args) 

Method Source Code

//package com.java2s;
/**/*from   www  .  j a  va 2s  . com*/
 * Project: webXValidate
 * 
 * File Created at 2011-12-23
 * $Id$
 * 
 * Copyright 2008 Alibaba.com Corporation Limited.
 * All rights reserved.
 *
 * This software is the confidential and proprietary information of
 * Alibaba Company. ("Confidential Information").  You shall not
 * disclose such Confidential Information and shall use it only in
 * accordance with the terms of the license agreement you entered into
 * with Alibaba.com.
 */

import java.text.MessageFormat;

public class Main {
    private MessageFormat mf;

    public static String formats(String pattern, Object... args) {
        return MessageFormat.format(pattern, args);
    }

    public String format(Object... args) {
        return mf.format(args);
    }
}

Related

  1. formatMessage(final String pattern, final Object... params)
  2. formatMessage(final String pattern, final String param1)
  3. formatMessage(String message, Object param1)
  4. formatMessage(String message, Object... args)
  5. formatResource(Object[] info, String require)
  6. formatString(ResourceBundle resourceBundle, String key, Object data)
  7. formatString(String format, String arg1)
  8. formatString(String message, Object... args)
  9. formatString(String str, String pattern)