Class DynamicListProperty<T>

    • Constructor Detail

      • DynamicListProperty

        public DynamicListProperty()
      • DynamicListProperty

        public DynamicListProperty​(List<T> initialValue)
    • Method Detail

      • set

        public void set​(List<T> value)
      • setValue

        public void setValue​(List<T> value)
        Description copied from interface: DynamicProperty
        Sets the value of this DynamicProperty. If the underlying property is a primitive type then this method throws NullPointerException when passing a null argument. All other DynamicProperty types accepts null as a value.
        Specified by:
        setValue in interface DynamicProperty<T>
      • toString

        public String toString()
      • getCurrentValue

        public T getCurrentValue()
        Description copied from interface: DynamicProperty
        Returns the current value of this DynamicProperty. For primitive types the boxed version is returned (never null).
        Specified by:
        getCurrentValue in interface DynamicProperty<T>
      • get

        public T get()
        Specified by:
        get in interface Supplier<T>
      • addListener

        public void addListener​(DynamicPropertyListener<T> listener)
        Description copied from interface: DynamicProperty
        Adds a given listener to the underlying property. The listener will be notified each time the property value changes.

        Events are not guaranteed to be received in the same order as the underlying property is set.

        The listener will be notified synchronously on the same thread that mutates the underlying property, so don't do any long-running work on the thread that notifies the DynamicPropertyListener.

        Specified by:
        addListener in interface DynamicProperty<T>