net.sf.mmm.util.nls.impl.formatter
Class NlsMessageFormatterImpl.PatternSegment
java.lang.Object
net.sf.mmm.util.nls.impl.formatter.NlsMessageFormatterImpl.PatternSegment
- Enclosing class:
- NlsMessageFormatterImpl
protected static class NlsMessageFormatterImpl.PatternSegment
- extends Object
This inner class represents a segment out of the parsed message-pattern.
E.g. if the message-pattern is "Hi {0} you have {1} items!" then it is
parsed into two NlsMessageFormatterImpl.PatternSegments. The first has a prefix of
"Hi " and argument of {0} and the second
has " you have " as prefix and argument of
{1}. The rest of the pattern which is " items!"
will be stored in NlsMessageFormatterImpl.suffix.
prefix
private final String prefix
- See Also:
getPrefix()
argument
private final NlsArgument argument
- See Also:
getArgument()
NlsMessageFormatterImpl.PatternSegment
public NlsMessageFormatterImpl.PatternSegment(String prefix,
NlsArgument argument)
- The constructor.
- Parameters:
prefix - is the prefix.argument - is the argument.
getPrefix
public String getPrefix()
- This method gets the prefix. This is the raw part of the message-pattern
(until the next '{') that will be taken as is.
- Returns:
- the prefix
getArgument
public NlsArgument getArgument()
- This method gets the
NlsArgument.
- Returns:
- the argument.
toString
public String toString()
-
- Overrides:
toString in class Object
Copyright © 2001-2010 mmm-Team. All Rights Reserved.