Clover coverage report - Code Coverage for hivemind release 1.0
Coverage timestamp: Wed Sep 22 2004 08:05:25 EDT
file stats: LOC: 75   Methods: 0
NCLOC: 10   Classes: 1
30 day Evaluation Version distributed via the Maven Jar Repository. Clover is not free. You have 30 days to evaluate it. Please visit http://www.thecortex.net/clover to obtain a licensed version of Clover
 
 Source file Conditionals Statements Methods TOTAL
Messages.java - - - -
coverage
 1   
 //  Copyright 2004 The Apache Software Foundation
 2   
 //
 3   
 // Licensed under the Apache License, Version 2.0 (the "License");
 4   
 // you may not use this file except in compliance with the License.
 5   
 // You may obtain a copy of the License at
 6   
 //
 7   
 //     http://www.apache.org/licenses/LICENSE-2.0
 8   
 //
 9   
 // Unless required by applicable law or agreed to in writing, software
 10   
 // distributed under the License is distributed on an "AS IS" BASIS,
 11   
 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 12   
 // See the License for the specific language governing permissions and
 13   
 // limitations under the License.
 14   
 
 15   
 package org.apache.hivemind;
 16   
 
 17   
 /**
 18   
  * A set of localized message strings.  This is somewhat like
 19   
  * a {@link java.util.ResourceBundle}, but with more
 20   
  * flexibility about where the messages come from.  In addition,
 21   
  * it includes methods similar to {@link java.text.MessageFormat}
 22   
  * for treating the messages as patterns.
 23   
  * 
 24   
  * @author Howard Lewis Ship
 25   
  *
 26   
  */
 27   
 public interface Messages
 28   
 {
 29   
     /**
 30   
      * Searches for a localized string with the given key.
 31   
      * If not found, a modified version of the key
 32   
      * is returned (all upper-case and surrounded by square
 33   
      * brackets).
 34   
      */
 35   
 
 36   
     public String getMessage(String key);
 37   
 
 38   
     /**
 39   
      * Searches for a localized string with the given key.
 40   
      * If not found, then the default value (which should already
 41   
      * be localized) is returned.  Passing a default of null
 42   
      * is useful when trying to determine if the strings contains
 43   
      * a given key.
 44   
      */
 45   
 
 46   
     public String getMessage(String key, String defaultValue);
 47   
 
 48   
     /**
 49   
      * Formats a string, using
 50   
      * {@link MessageFormat#format(java.lang.String, java.lang.Object[])}.
 51   
      *
 52   
      * @param key the key used to obtain a localized pattern using
 53   
      * {@link #getMessage(String)}
 54   
      * @param arguments passed to the formatter
 55   
      */
 56   
 
 57   
     public String format(String key, Object[] arguments);
 58   
 
 59   
     /**
 60   
      * Convienience method for invoking {@link #format(String, Object[])}.
 61   
      */
 62   
     public String format(String key, Object argument);
 63   
 
 64   
     /**
 65   
      * Convienience method for invoking {@link #format(String, Object[])}.
 66   
      */
 67   
 
 68   
     public String format(String key, Object argument1, Object argument2);
 69   
 
 70   
     /**
 71   
      * Convienience method for invoking {@link #format(String, Object[])}.
 72   
      */
 73   
     public String format(String key, Object argument1, Object argument2, Object argument3);
 74   
 }
 75