Package jmri.beans

Class ArbitraryPropertySupport

java.lang.Object
jmri.beans.ArbitraryPropertySupport
All Implemented Interfaces:
BeanInterface

public class ArbitraryPropertySupport extends Object implements BeanInterface
Provide support for converging the Arbitrary* classes with the non-arbitrary versions of those classes so that the Arbitrary* version can extend the non-arbitrary class.
  • Constructor Details

  • Method Details

    • setIndexedProperty

      public void setIndexedProperty(String key, int index, Object value)
      Set the value of an element in an indexed property.

      NOTE Implementing methods must not call Bean.setIndexedProperty(), as doing so will cause a stack overflow. Implementing methods may call Beans.setIntrospectedIndexedProperty() instead.

      Specified by:
      setIndexedProperty in interface BeanInterface
      Parameters:
      key - name of the property
      index - index of the property element to change
      value - the value to set the property to
    • getIndexedProperty

      public Object getIndexedProperty(String key, int index)
      Get the value of an element in an indexed property.

      NOTE Implementing methods must not call Bean.getIndexedProperty(), as doing so will cause a stack overflow. Implementing methods may call Beans.getIntrospectedIndexedProperty() instead.

      Specified by:
      getIndexedProperty in interface BeanInterface
      Parameters:
      key - name of the property
      index - index of the property element to change
      Returns:
      value of the property or null
    • setProperty

      public void setProperty(String key, Object value)
      Set the value of a property.

      NOTE Implementing methods must not call Bean.setProperty(), as doing so will cause a stack overflow. Implementing methods may call Beans.setIntrospectedProperty() instead.

      Specified by:
      setProperty in interface BeanInterface
      Parameters:
      key - name of the property
      value - the value to set the property to
    • getProperty

      public Object getProperty(String key)
      Get the value of a property.

      NOTE Implementing methods must not call Bean.getProperty(), as doing so will cause a stack overflow. Implementing methods may call Beans.getIntrospectedProperty() instead.

      Specified by:
      getProperty in interface BeanInterface
      Parameters:
      key - name of the property
      Returns:
      The value of the property or null
    • hasProperty

      public boolean hasProperty(String key)
      Test that a property exists.

      NOTE Implementing method must not call Bean.hasProperty(), as doing so will cause a stack overflow. Implementing methods may call Beans.hasIntrospectedProperty() instead.

      Specified by:
      hasProperty in interface BeanInterface
      Parameters:
      key - name of the property
      Returns:
      true is property key exists
    • hasIndexedProperty

      public boolean hasIndexedProperty(String key)
      Test that a property exists and is indexed.

      NOTE Implementing method must not call Bean.hasIndexedProperty(), as doing so will cause a stack overflow. Implementing methods may call Beans.hasIntrospectedIndexedProperty() instead.

      Specified by:
      hasIndexedProperty in interface BeanInterface
      Parameters:
      key - name of the property
      Returns:
      true is property key exists and is indexed
    • getPropertyNames

      List all property names or keys.

      NOTE Implementing method must not call Bean.getPropertyNames(), as doing so will cause a stack overflow. Implementing methods may call Beans.getIntrospectedPropertyNames() instead.

      NOTE Implementations of this method should not return null.

      Specified by:
      getPropertyNames in interface BeanInterface
      Returns:
      property names or an empty Set.