Interface ValueSource<V>

All Superinterfaces:
DataUnit, HasType<V>
All Known Subinterfaces:
EntityValueSource<E,V>
All Known Implementing Classes:
BufferedContainerValueSource, ContainerValueSource

public interface ValueSource<V> extends DataUnit, HasType<V>
Data component holding a typed value.
  • Method Details

    • getValue

      @Nullable V getValue()
      Returns the current value stored in the value source.
      Returns:
      the current value, or null if no value is set
    • setValue

      void setValue(@Nullable V value)
      Sets the given value to this value source.
      Parameters:
      value - the value to be set
    • isReadOnly

      boolean isReadOnly()
      Checks whether the value source is read-only.
      Returns:
      true if the value source is read-only, false otherwise
    • addValueChangeListener

      com.vaadin.flow.shared.Registration addValueChangeListener(Consumer<ValueSource.ValueChangeEvent<V>> listener)
      Registers a new value change listener.
      Parameters:
      listener - the listener to be added
      Returns:
      a registration object for removing an event listener added to a source