Package jmri.beans

Interface BeanInterface

    • Method Detail

      • setIndexedProperty

        void setIndexedProperty​(@Nonnull
                                String key,
                                int index,
                                @CheckForNull
                                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.

        Parameters:
        key - name of the property
        index - index of the property element to change
        value - the value to set the property to
      • getIndexedProperty

        @CheckForNull
        Object getIndexedProperty​(@Nonnull
                                  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.

        Parameters:
        key - name of the property
        index - index of the property element to change
        Returns:
        value of the property or null
      • setProperty

        void setProperty​(@Nonnull
                         String key,
                         @CheckForNull
                         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.

        Parameters:
        key - name of the property
        value - the value to set the property to
      • getProperty

        @CheckForNull
        Object getProperty​(@Nonnull
                           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.

        Parameters:
        key - name of the property
        Returns:
        The value of the property or null
      • hasProperty

        boolean hasProperty​(@Nonnull
                            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.

        Parameters:
        key - name of the property
        Returns:
        true is property key exists
      • hasIndexedProperty

        boolean hasIndexedProperty​(@Nonnull
                                   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.

        Parameters:
        key - name of the property
        Returns:
        true is property key exists and is indexed
      • getPropertyNames

        @Nonnull
        Set<StringgetPropertyNames()
        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.

        Returns:
        property names or an empty Set.