Package org.jpmml.model.temporals
Class DateTime
- java.lang.Object
-
- org.jpmml.model.temporals.Instant<DateTime>
-
- org.jpmml.model.temporals.DateTime
-
- All Implemented Interfaces:
Serializable,Comparable<DateTime>,ComplexValue
public class DateTime extends Instant<DateTime>
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description DateTime(int year, int month, int dayOfMonth, int hour, int minute, int second)DateTime(LocalDateTime dateTime)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(DateTime that)booleanequals(Object object)Stringformat(String pattern)DataTypegetDataType()LocalDateTimegetDateTime()inthashCode()static DateTimeparse(String value)DatetoDate()SecondsSinceDatetoSecondsSinceYear(int year)StringtoSimpleValue()TimetoTime()static DateTimevalueOf(Object value)
-
-
-
Constructor Detail
-
DateTime
public DateTime(int year, int month, int dayOfMonth, int hour, int minute, int second)
-
DateTime
public DateTime(LocalDateTime dateTime)
-
-
Method Detail
-
getDataType
public DataType getDataType()
- Specified by:
getDataTypein classInstant<DateTime>
-
toSimpleValue
public String toSimpleValue()
- Returns:
- A non-
nullvalue, which can be converted to String representation viaObject.toString().
-
format
public String format(String pattern)
- Specified by:
formatin classInstant<DateTime>- See Also:
String.format(String, Object...)
-
toDate
public Date toDate()
-
toTime
public Time toTime()
-
toSecondsSinceYear
public SecondsSinceDate toSecondsSinceYear(int year)
-
compareTo
public int compareTo(DateTime that)
-
getDateTime
public LocalDateTime getDateTime()
-
parse
public static DateTime parse(String value) throws DateTimeParseException
- Throws:
DateTimeParseException
-
-