Class DateTimePattern
java.lang.Object
com.northconcepts.datapipeline.foundations.core.Bean
com.northconcepts.datapipeline.foundations.time.DateTimePattern
- All Implemented Interfaces:
DataExceptionContributor,JsonSerializable,RecordSerializable,XmlSerializable,Serializable,Comparable<DateTimePattern>
A serializable, comparable wrapper for
DateTimeFormatter that can be used as keys in Map and values in Set.- See Also:
-
Field Summary
Fields inherited from interface com.northconcepts.datapipeline.core.RecordSerializable
SERIALIZED_CLASS_NAME, TYPEFields inherited from interface com.northconcepts.datapipeline.core.XmlSerializable
XML_SERIALIZED_CLASS_NAME -
Constructor Summary
ConstructorsConstructorDescriptionDateTimePattern(String pattern) Creates a new instance using a date-time pattern for case-insensitive parsing. -
Method Summary
Modifier and TypeMethodDescriptionintbooleanReturns the case-insensitive, non-lenient formatter built from the pattern, or null if no pattern is set.Returns the date-time pattern for case-insensitive parsing.inthashCode()setPattern(String pattern) Sets the date-time pattern for case-insensitive parsing.toString()Returns a basic JSON representation of this instance.Methods inherited from class com.northconcepts.datapipeline.foundations.core.Bean
addExceptionProperties, fromRecord, toRecordMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.northconcepts.datapipeline.core.DataExceptionContributor
addExceptionProperties, exception, exception, exceptionMethods inherited from interface com.northconcepts.datapipeline.core.RecordSerializable
fromJson, fromJson, toJson, toJson, toJsonMethods inherited from interface com.northconcepts.datapipeline.core.XmlSerializable
fromXml, fromXml, fromXmlElement, toXml, toXml, toXml, toXml, toXml, toXmlElement
-
Constructor Details
-
DateTimePattern
public DateTimePattern() -
DateTimePattern
Creates a new instance using a date-time pattern for case-insensitive parsing. SeeDateTimeFormatterBuilder.appendPattern(String).- Parameters:
pattern- a date-format pattern for case-insensitive parsing. SeeDateTimeFormatterBuilder.appendPattern(String).
-
-
Method Details
-
getPattern
Returns the date-time pattern for case-insensitive parsing. SeeDateTimeFormatterBuilder.appendPattern(String). -
setPattern
Sets the date-time pattern for case-insensitive parsing. SeeDateTimeFormatterBuilder.appendPattern(String).- Parameters:
pattern- a date-format pattern for case-insensitive parsing. SeeDateTimeFormatterBuilder.appendPattern(String).
-
getFormatter
Returns the case-insensitive, non-lenient formatter built from the pattern, or null if no pattern is set. -
hashCode
public int hashCode() -
equals
-
compareTo
- Specified by:
compareToin interfaceComparable<DateTimePattern>
-
toString
Description copied from class:BeanReturns a basic JSON representation of this instance.
-