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

public abstract class DateType extends TypeSchema
type schema for date
  • Field Details

    • year

      public final IntParam year
      year field
    • month

      public final IntParam month
      month field
    • day

      public final IntParam day
      day field
    • hour

      public final IntParam hour
      hour field
    • minute

      public final IntParam minute
      minute field
    • second

      public final IntParam second
      second field
    • millisecond

      public final IntParam millisecond
      millisecond field
    • timezone

      public final IntParam timezone
      time zone field
    • SIMPLE_DATE_FORMATTER

      public static final SimpleDateFormat SIMPLE_DATE_FORMATTER
      simple date format current default setting for handling date
    • DATE_FORMATTER

      public static final SimpleDateFormat 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

  • Method Details

    • setDateFields

      protected void setDateFields(List<IntParam> fields)
    • getDateFields

      public List<IntParam> getDateFields()
      Returns:
      a list of date fields used in this type
    • getDateInstance

      public abstract Object getDateInstance(List<IntParam> values)
      Parameters:
      values - are a list of values for the date
      Returns:
      a date instance based on the values
    • getIntValues

      public abstract List<IntParam> getIntValues(Object date)
      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

      public abstract long getDateLong(List<IntParam> values)
      Parameters:
      values -
      Returns:
      date with long format
    • getDateString

      public abstract String getDateString(List<IntParam> values)
      Parameters:
      values - are a list of values for the date
      Returns:
      a string representing the date with the specified values
    • formatZZZZ

      protected String formatZZZZ(int zone)