Class ObjectProperty

  • All Implemented Interfaces:
    java.io.Serializable

    public class ObjectProperty
    extends java.lang.Object
    implements java.io.Serializable
    An instance of this class identifies a property in an object, e.g. the name property of a specific person.

    To add custom information that additionally qualifies the object property, it is possible to implement and use an IPropertyQualifier.

    See Also:
    Serialized Form
    • Constructor Detail

      • ObjectProperty

        public ObjectProperty​(java.lang.Object object,
                              java.lang.String property,
                              int index,
                              IPropertyQualifier qualifier)
        Creates a new ObjectProperty. If the property is a list or an array the index can specify the position within the property. An index smaller than 0 indicates that it is not an indexed property.

        It is possible to provide additional information using the qualifier and implementing the interface IPropertyQualifier.

      • ObjectProperty

        public ObjectProperty​(java.lang.Object object,
                              java.lang.String property,
                              IPropertyQualifier qualifier)
        Creates a new ObjectProperty.

        It is possible to provide additional information using the qualifier and implementing the interface IPropertyQualifier.

      • ObjectProperty

        public ObjectProperty​(java.lang.Object object,
                              java.lang.String property,
                              int index)
        Creates a new ObjectProperty. If the property is a list or an array the index can specify the position within the property. An index smaller than 0 indicates that it is not an indexed property.
      • ObjectProperty

        public ObjectProperty​(java.lang.Object object,
                              java.lang.String property)
        Creates an ObjectProperty that characterizes the object and the name of the property.
      • ObjectProperty

        public ObjectProperty​(java.lang.Object object)
        Creates an ObjectProperty that characterizes only the object but not a specific property of it.
    • Method Detail

      • getObject

        public java.lang.Object getObject()
        The object that is identified by this ObjectProperty.
      • getProperty

        public java.lang.String getProperty()
        The name of the property that is identified by this ObjectProperty. The property name should be available as bean property in the given object.
      • getIndex

        public int getIndex()
        In case of getObject() is an array or list this index defines which object of the index is referenced.
        Returns:
        The index of the referenced object in the array/list that is referenced by getObject(). Returns -1 if there is no index available.
        See Also:
        hasIndex()
      • hasIndex

        public boolean hasIndex()
        Returns whether this ObjectProperty has an index that identifies an object in an array or list.
        Returns:
        true if this ObjectProperty references an index, false if there is no index available.
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object