Class DateEditor

All Implemented Interfaces:
PropertyEditor

public class DateEditor extends AbstractPropertyEditor
A PropertyEditor which converts a String into a Date and vice versa.
  • Field Details

    • MILLIS

      private static final Pattern MILLIS
    • formats

      private final DateFormat[] formats
  • Constructor Details

    • DateEditor

      public DateEditor()
      Creates a new DateEditor instance
  • Method Details

    • toText

      protected String toText(Object value)
      Returns a String representation of the given value
      Specified by:
      toText in class AbstractPropertyEditor
      Parameters:
      value - The value
      Returns:
      A String representation of the value
    • toValue

      protected Object toValue(String text)
      Returns an instance from a String representation of an object
      Specified by:
      toValue in class AbstractPropertyEditor
      Parameters:
      text - The String representation to convert
      Returns:
      A instance of an object