public abstract class SoyMsgBundle extends Object implements Iterable<SoyMsg>
| Modifier and Type | Field and Description |
|---|---|
static SoyMsgBundle |
EMPTY
Null object for SoyMsgBundle, assumes English Locale.
|
| Constructor and Description |
|---|
SoyMsgBundle() |
| Modifier and Type | Method and Description |
|---|---|
com.ibm.icu.util.ULocale |
getLocale()
Returns the
ULocale of this message bundle. |
abstract String |
getLocaleString()
Gets the language/locale string of this bundle of messages.
|
abstract SoyMsg |
getMsg(long msgId)
Retrieves a message by its unique message id.
|
com.google.common.collect.ImmutableList<SoyMsgPart> |
getMsgParts(long msgId)
Returns the message parts, or an empty array if there is no such message.
|
abstract int |
getNumMsgs()
Gets the number of messages in this bundle.
|
boolean |
isRtl()
Returns
true if this is an RTL (right-to-left) locale. |
abstract Iterator<SoyMsg> |
iterator()
Returns an iterator over all the messages.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEach, spliteratorpublic static final SoyMsgBundle EMPTY
@Nullable public abstract String getLocaleString()
public boolean isRtl()
true if this is an RTL (right-to-left) locale. Subclasses are encouraged to
override this to provide efficient implementations.@Nullable public com.ibm.icu.util.ULocale getLocale()
ULocale of this message bundle. Subclasses are encouraged to override this
to provide efficient implementations.public com.google.common.collect.ImmutableList<SoyMsgPart> getMsgParts(long msgId)
This is useful for rendering only usecases when the rest of the SoyMsg doesn't
matter. The default implementation is just SoyMsg.getParts() but some subclasses may have
more efficient implementations
public abstract SoyMsg getMsg(long msgId)
msgId - The message id of the message to retrieve.public abstract int getNumMsgs()