Interface AnyValued<Type>

All Superinterfaces:
AnyProvider
All Known Implementing Classes:
EntryNode

@Deprecated(since="2.13", forRemoval=true) public interface AnyValued<Type> extends AnyProvider
Deprecated, for removal: This API element is subject to removal in a future version.
A provider for anything with a value. Anything implementing this (or convertible to this) can be used by the ExprSubnodeValue property expression.
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    default void
    Deprecated, for removal: This API element is subject to removal in a future version.
    The behaviour for changing this thing's value, if possible.
    default void
    Deprecated, for removal: This API element is subject to removal in a future version.
    This method can be overridden to filter out bad values (e.g.
    default <Converted>
    Converted
    convertedValue(ClassInfo<Converted> expected)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    default void
    Deprecated, for removal: This API element is subject to removal in a future version.
    A default implementation of 'resetting' the value (setting it to null).
    default boolean
    Deprecated, for removal: This API element is subject to removal in a future version.
    This is called before changeValue(Object).
    @UnknownNullability Type
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    Deprecated, for removal: This API element is subject to removal in a future version.
     
  • Method Details

    • value

      @UnknownNullability Type value()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Returns:
      This thing's value
    • convertedValue

      default <Converted> Converted convertedValue(ClassInfo<Converted> expected)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • supportsValueChange

      default boolean supportsValueChange()
      Deprecated, for removal: This API element is subject to removal in a future version.
      This is called before changeValue(Object). If the result is false, setting the value will never be attempted.
      Returns:
      Whether this supports being set
    • changeValue

      default void changeValue(Type value) throws UnsupportedOperationException
      Deprecated, for removal: This API element is subject to removal in a future version.
      The behaviour for changing this thing's value, if possible. If not possible, then supportsValueChange() should return false and this may throw an error.
      Parameters:
      value - The new value
      Throws:
      UnsupportedOperationException - If this is impossible
    • valueType

      Class<Type> valueType()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Returns:
      The type of values this accepts (or provides)
    • resetValue

      default void resetValue() throws UnsupportedOperationException
      Deprecated, for removal: This API element is subject to removal in a future version.
      A default implementation of 'resetting' the value (setting it to null). Implementations should override this if different behaviour is required.
      Throws:
      UnsupportedOperationException - If changing is not supported
    • changeValueSafely

      default void changeValueSafely(Object value) throws UnsupportedOperationException
      Deprecated, for removal: This API element is subject to removal in a future version.
      This method can be overridden to filter out bad values (e.g. null, objects of the wrong type, etc.) and make sure changeValue(Object) is not called with a bad parameter.
      Parameters:
      value - The (unchecked) new value
      Throws:
      UnsupportedOperationException