com.google.template.soy.msgs
Interface SoyMsgBundle

All Superinterfaces:
Iterable<com.google.template.soy.msgs.restricted.SoyMsg>

public interface SoyMsgBundle
extends Iterable<com.google.template.soy.msgs.restricted.SoyMsg>

Represents a full set of messages in some language/locale.


Field Summary
static SoyMsgBundle EMPTY
          Null object for SoyMsgBundle.
 
Method Summary
 String getLocaleString()
          Gets the language/locale string of this bundle of messages.
 com.google.template.soy.msgs.restricted.SoyMsg getMsg(long msgId)
          Retrieves a message by its unique message id.
 int getNumMsgs()
          Gets the number of messages in this bundle.
 Iterator<com.google.template.soy.msgs.restricted.SoyMsg> iterator()
          Returns an iterator over all the messages.
 

Field Detail

EMPTY

static final SoyMsgBundle EMPTY
Null object for SoyMsgBundle.

Method Detail

getLocaleString

String getLocaleString()
Gets the language/locale string of this bundle of messages.

Returns:
The language/locale string of the messages provided by this bundle.

getMsg

com.google.template.soy.msgs.restricted.SoyMsg getMsg(long msgId)
Retrieves a message by its unique message id.

Parameters:
msgId - The message id of the message to retrieve.
Returns:
The corresponding message, or null if not found.

getNumMsgs

int getNumMsgs()
Gets the number of messages in this bundle.

Returns:
The number of messages in this bundle.

iterator

Iterator<com.google.template.soy.msgs.restricted.SoyMsg> iterator()
Returns an iterator over all the messages.

Specified by:
iterator in interface Iterable<com.google.template.soy.msgs.restricted.SoyMsg>
Returns:
An iterator over all the messages.