Class AbstractPropertyBean

java.lang.Object
org.jhotdraw8.fxbase.beans.AbstractPropertyBean
All Implemented Interfaces:
PropertyBean
Direct Known Subclasses:
SimplePropertyBean

public abstract class AbstractPropertyBean extends Object implements PropertyBean
An abstrac implementation of the PropertyBean interface.
Author:
Werner Randelshofer
  • Field Details

    • properties

      protected final javafx.collections.ObservableMap<Key<?>,Object> properties
      Holds the properties.
  • Constructor Details

    • AbstractPropertyBean

      public AbstractPropertyBean()
  • Method Details

    • getProperties

      public final javafx.collections.ObservableMap<Key<?>,Object> getProperties()
      Description copied from interface: PropertyBean
      Returns an observable map of property keys and their values.
      Specified by:
      getProperties in interface PropertyBean
      Returns:
      the map
    • get

      public <T> @Nullable T get(MapAccessor<T> key)
      Description copied from interface: PropertyBean
      Gets a property value.
      Specified by:
      get in interface PropertyBean
      Type Parameters:
      T - the value type
      Parameters:
      key - the key
      Returns:
      the value
    • getNonNull

      public <T> T getNonNull(NonNullMapAccessor<T> key)
      Description copied from interface: PropertyBean
      Gets a nonnull property value.
      Specified by:
      getNonNull in interface PropertyBean
      Type Parameters:
      T - the value type
      Parameters:
      key - the key
      Returns:
      the value