comparison artifacts/src/main/java/org/dive4elements/river/artifacts/resources/Resources.java @ 8849:e4aadc953665

Using varargs for message arguments
author gernotbelger
date Thu, 18 Jan 2018 18:21:30 +0100
parents 1cd7225df846
children 590d763ea49b
comparison
equal deleted inserted replaced
8848:4ba55fae5ef3 8849:e4aadc953665
122 * @param args The arguments that are necessary for the template. 122 * @param args The arguments that are necessary for the template.
123 * 123 *
124 * @return a translated string. 124 * @return a translated string.
125 */ 125 */
126 public static String getMsg( 126 public static String getMsg(
127 CallMeta meta, 127 CallMeta meta,
128 String key, 128 String key,
129 String def, 129 String def,
130 Object[] args) 130 Object... args)
131 { 131 {
132 String template = getMsg(meta, key, (String)null); 132 String template = getMsg(meta, key, (String)null);
133 133
134 if (template == null) { 134 if (template == null) {
135 return def; 135 return def;
136 } 136 }
137 137
138 return format(meta, template, args); 138 return format(meta, template, args);
139 } 139 }
140 140
141 public static String format( 141 public static String format(
142 CallMeta meta, 142 CallMeta meta,
143 String key, 143 String key,

http://dive4elements.wald.intevation.org