Class GenericContext<T>

    • Constructor Detail

      • GenericContext

        public GenericContext​(java.text.Format format)
      • GenericContext

        GenericContext​(TypeContext<?> delegate,
                       java.text.Format format)
    • Method Detail

      • enforce

        public T enforce​(T object)
        Description copied from interface: TypeContext
        Will force the object to conform to the context's specification. The default implementation formats a String and then parses that back to an object (of the original type).
      • configureFormat

        protected void configureFormat​(java.text.Format format,
                                       java.lang.Object object)
        Specified by:
        configureFormat in class FormatContext<T>
      • handleFormatException

        protected java.lang.String handleFormatException​(java.text.Format format,
                                                         java.lang.Object object)
        Specified by:
        handleFormatException in class FormatContext<T>
      • handleParseException

        protected T handleParseException​(java.text.Format format,
                                         java.lang.String string)
        Specified by:
        handleParseException in class FormatContext<T>