Class MessageFmt.SimpleDateFormatArgumentSegment
java.lang.Object
org.dellroad.stuff.text.MessageFmt.Segment
org.dellroad.stuff.text.MessageFmt.ArgumentSegment
org.dellroad.stuff.text.MessageFmt.FormatArgumentSegment<DateFormat>
org.dellroad.stuff.text.MessageFmt.DateFormatArgumentSegment<SimpleDateFormat>
org.dellroad.stuff.text.MessageFmt.SimpleDateFormatArgumentSegment
- All Implemented Interfaces:
SelfValidating
- Enclosing class:
MessageFmt
@SelfValidates
public static class MessageFmt.SimpleDateFormatArgumentSegment
extends MessageFmt.DateFormatArgumentSegment<SimpleDateFormat>
implements SelfValidating
A
MessageFormat argument segment that formats the argument using a SimpleDateFormat.-
Constructor Summary
ConstructorsConstructorDescriptionSimpleDateFormatArgumentSegment(int argumentNumber, SimpleDateFormat format) -
Method Summary
Modifier and TypeMethodDescriptionvoidcheckValid(jakarta.validation.ConstraintValidatorContext context) Validate this instance.booleanprotected StringGet theMessageFormatpattern string argument suffix, if any.@NotNull StringinthashCode()voidsetPattern(String pattern) voidvisit(MessageFmt.SegmentSwitch target) Visit the method of the given switch corresponding to this instance's concrete type.Methods inherited from class MessageFmt.FormatArgumentSegment
ofMethods inherited from class MessageFmt.ArgumentSegment
getArgumentNumber, setArgumentNumber, toPattern, toString
-
Constructor Details
-
SimpleDateFormatArgumentSegment
public SimpleDateFormatArgumentSegment() -
SimpleDateFormatArgumentSegment
-
-
Method Details
-
getPattern
-
setPattern
-
getArgumentSuffix
Description copied from class:MessageFmt.ArgumentSegmentGet theMessageFormatpattern string argument suffix, if any.If present, this suffix follows the argument number and a comma, and precedes the closing curly brace.
- Specified by:
getArgumentSuffixin classMessageFmt.ArgumentSegment- Returns:
- pattern string argument suffix, or null if none needed
-
visit
Description copied from class:MessageFmt.SegmentVisit the method of the given switch corresponding to this instance's concrete type.- Specified by:
visitin classMessageFmt.Segment- Parameters:
target- visitor pattern target
-
checkValid
public void checkValid(jakarta.validation.ConstraintValidatorContext context) throws SelfValidationException Description copied from interface:SelfValidatingValidate this instance.- Specified by:
checkValidin interfaceSelfValidating- Parameters:
context- validation context- Throws:
SelfValidationException- to indicate this instance is invalid
-
equals
- Overrides:
equalsin classMessageFmt.ArgumentSegment
-
hashCode
public int hashCode()- Overrides:
hashCodein classMessageFmt.ArgumentSegment
-