public class TokenIterator
extends java.lang.Object
Constructor and Description |
---|
TokenIterator(java.util.List<Token> tokens) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getInterpolatedMessage() |
boolean |
hasMoreInterpolationTerms()
Called to advance the next interpolation term of the message descriptor.
|
java.lang.String |
nextInterpolationTerm() |
void |
replaceCurrentInterpolationTerm(java.lang.String replacement)
Replaces the current interpolation term with the given string.
|
public TokenIterator(java.util.List<Token> tokens)
public boolean hasMoreInterpolationTerms() throws MessageDescriptorFormatException
false
all interpolation terms have been processed and getInterpolatedMessage()
can be called.true
in case there are more message parameters, false
otherwise.MessageDescriptorFormatException
- in case the message descriptor is invalidpublic java.lang.String nextInterpolationTerm()
public void replaceCurrentInterpolationTerm(java.lang.String replacement)
replacement
- The string to replace the current term with.public java.lang.String getInterpolatedMessage()
Copyright © 2007-2022 Red Hat, Inc. All Rights Reserved