Interface IFeatureScalarItemValueHandler

All Superinterfaces:
IDefaultable, IItemValueHandler<Object>, IValued, IValuedMutable
All Known Subinterfaces:
IBoundFieldValue, IBoundInstanceFlag, IBoundInstanceModelFieldScalar

public interface IFeatureScalarItemValueHandler extends IItemValueHandler<Object>, IValuedMutable
A feature interface for handling scalar item values during binding operations.

Scalar items have simple values that can be converted directly by a data type adapter.

  • Method Details

    • setValue

      default void setValue(@NonNull Object parent, @NonNull String text)
      Apply the string value.

      This first parses the value using the underlying data type implementation and then applies the parsed value.

      Parameters:
      parent - the parent object to apply the value to
      text - the value to parse
      Throws:
      IllegalArgumentException - if the text was malformed
      See Also:
    • getValueFromString

      default Object getValueFromString(@NonNull String text)
      Parse a string value using the underlying data type implementation.
      Parameters:
      text - the value to parse
      Returns:
      the parsed value
      Throws:
      IllegalArgumentException - if the text was malformed
      See Also:
    • getJavaTypeAdapter

      @NonNull IDataTypeAdapter<?> getJavaTypeAdapter()
      Get the data type adapter supporting the scalar value.
      Returns:
      the data type adapter
    • deepCopyItem

      default Object deepCopyItem(Object source, IBoundObject parentInstance) throws BindingException
      Description copied from interface: IItemValueHandler
      Create and return a deep copy of the provided item.
      Specified by:
      deepCopyItem in interface IItemValueHandler<Object>
      Parameters:
      source - the item to copy
      parentInstance - an optional parent object to use for serialization callbacks
      Returns:
      the new deep copy
      Throws:
      BindingException - if an error occurred while analyzing the bound objects