Package org.dellroad.stuff.text
Class MessageFmt.Segment
java.lang.Object
org.dellroad.stuff.text.MessageFmt.Segment
- Direct Known Subclasses:
MessageFmt.ArgumentSegment,MessageFmt.TextSegment
- Enclosing class:
- MessageFmt
Represents one atomic portion of a
MessageFormat pattern string.- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleaninthashCode()abstract StringEncode this segment as aMessageFormatpattern fragment.abstract voidvisit(MessageFmt.SegmentSwitch target) Visit the method of the given switch corresponding to this instance's concrete type.
-
Constructor Details
-
Segment
public Segment()
-
-
Method Details
-
toPattern
Encode this segment as aMessageFormatpattern fragment.The concatenation of the encoding of the
MessageFmt.Segments in aMessageFmtproduces the correspondingMessageFormatpattern string.This method is responsible for escaping single quotes and opening curly braces, if necessary.
- Returns:
MessageFormatpattern string text
-
visit
Visit the method of the given switch corresponding to this instance's concrete type.- Parameters:
target- visitor pattern target
-
equals
-
hashCode
public int hashCode()
-