Class DateType
java.lang.Object
org.evomaster.client.java.controller.problem.rpc.schema.types.TypeSchema
org.evomaster.client.java.controller.problem.rpc.schema.types.DateType
- Direct Known Subclasses:
LocalDateType,UtilDateType
type schema for date
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final SimpleDateFormatcomplete date format which could conform with time long value note that if we employ this format, we need to extend time gene for supporting millisecond and timezonefinal IntParamday fieldfinal IntParamhour fieldfinal IntParammillisecond fieldfinal IntParamminute fieldfinal IntParammonth fieldfinal IntParamsecond fieldstatic final SimpleDateFormatsimple date format current default setting for handling datefinal IntParamtime zone fieldfinal IntParamyear fieldFields inherited from class org.evomaster.client.java.controller.problem.rpc.schema.types.TypeSchema
depth, spec -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected StringformatZZZZ(int zone) abstract ObjectgetDateInstance(List<IntParam> values) abstract longgetDateLong(List<IntParam> values) abstract StringgetDateString(List<IntParam> values) getIntValues(Object date) extract value of fields based on the date instanceprotected voidsetDateFields(List<IntParam> fields) Methods inherited from class org.evomaster.client.java.controller.problem.rpc.schema.types.TypeSchema
copy, getClazz, getDto, getFullTypeName, getFullTypeNameWithGenericType, getSimpleTypeName, getTypeNameForInstanceInJavaOrKotlin, sameType, setOriginalType
-
Field Details
-
year
year field -
month
month field -
day
day field -
hour
hour field -
minute
minute field -
second
second field -
millisecond
millisecond field -
timezone
time zone field -
SIMPLE_DATE_FORMATTER
simple date format current default setting for handling date -
DATE_FORMATTER
complete date format which could conform with time long value note that if we employ this format, we need to extend time gene for supporting millisecond and timezone
-
-
Constructor Details
-
DateType
-
DateType
-
-
Method Details
-
setDateFields
-
getDateFields
- Returns:
- a list of date fields used in this type
-
getDateInstance
- Parameters:
values- are a list of values for the date- Returns:
- a date instance based on the values
-
getIntValues
extract value of fields based on the date instance- Parameters:
date- is an instance of Date, eg, java.util.Date or java.time.LocalDate- Returns:
- a list of fields which contains specific values
-
getDateLong
- Parameters:
values-- Returns:
- date with long format
-
getDateString
- Parameters:
values- are a list of values for the date- Returns:
- a string representing the date with the specified values
-
formatZZZZ
-