Added exists().
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2949 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
//
|
||||
// $Id: MessageBundle.java,v 1.23 2004/01/25 13:23:09 mdb Exp $
|
||||
// $Id: MessageBundle.java,v 1.24 2004/02/05 17:39:03 mdb Exp $
|
||||
|
||||
package com.threerings.util;
|
||||
|
||||
@@ -52,6 +52,15 @@ public class MessageBundle
|
||||
return (msg != null) ? msg : key;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if we have a translation mapping for the supplied key,
|
||||
* false if not.
|
||||
*/
|
||||
public boolean exists (String key)
|
||||
{
|
||||
return getResourceString(key, false) != null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a String from the resource bundle, or null if there was an error.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user