net.sf.mmm.util.nls.impl.formatter
Class NlsMessageFormatterImpl.PatternSegment

java.lang.Object
  extended by 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.


Field Summary
private  NlsArgument argument
           
private  String prefix
           
 
Constructor Summary
NlsMessageFormatterImpl.PatternSegment(String prefix, NlsArgument argument)
          The constructor.
 
Method Summary
 NlsArgument getArgument()
          This method gets the NlsArgument.
 String getPrefix()
          This method gets the prefix.
 String toString()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

prefix

private final String prefix
See Also:
getPrefix()

argument

private final NlsArgument argument
See Also:
getArgument()
Constructor Detail

NlsMessageFormatterImpl.PatternSegment

public NlsMessageFormatterImpl.PatternSegment(String prefix,
                                              NlsArgument argument)
The constructor.

Parameters:
prefix - is the prefix.
argument - is the argument.
Method Detail

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.