Class PropertysetItem

  • All Implemented Interfaces:
    Item, Item.PropertySetChangeNotifier, Serializable, Cloneable
    Direct Known Subclasses:
    BeanItem

    @Deprecated
    public class PropertysetItem
    extends Object
    implements Item, Item.PropertySetChangeNotifier, Cloneable
    Deprecated.
    As of 8.0, no direct replacement available. You can use Map directly as an item for Binder or DataProvider and access item properties with lambdas like binder.forField(component).bind(...) or new Grid<Map<...>>(dataProvider).addColumn(map->map.get(...)).
    Class for handling a set of identified Properties. The elements contained in a MapItem can be referenced using locally unique identifiers. The class supports listeners who are interested in changes to the Property set managed by the class.
    Since:
    3.0
    Author:
    Vaadin Ltd.
    See Also:
    Serialized Form
    • Constructor Detail

      • PropertysetItem

        public PropertysetItem()
        Deprecated.
    • Method Detail

      • getItemProperty

        public Property getItemProperty​(Object id)
        Deprecated.
        Gets the Property corresponding to the given Property ID stored in the Item. If the Item does not contain the Property, null is returned.
        Specified by:
        getItemProperty in interface Item
        Parameters:
        id - the identifier of the Property to get.
        Returns:
        the Property with the given ID or null
      • getItemPropertyIds

        public Collection<?> getItemPropertyIds()
        Deprecated.
        Gets the collection of IDs of all Properties stored in the Item.
        Specified by:
        getItemPropertyIds in interface Item
        Returns:
        unmodifiable collection containing IDs of the Properties stored the Item
      • removeItemProperty

        public boolean removeItemProperty​(Object id)
        Deprecated.
        Removes the Property identified by ID from the Item. This functionality is optional. If the method is not implemented, the method always returns false.
        Specified by:
        removeItemProperty in interface Item
        Parameters:
        id - the ID of the Property to be removed.
        Returns:
        true if the operation succeeded false if not
      • addItemProperty

        public boolean addItemProperty​(Object id,
                                       Property property)
        Deprecated.
        Tries to add a new Property into the Item.
        Specified by:
        addItemProperty in interface Item
        Parameters:
        id - the ID of the new Property.
        property - the Property to be added and associated with the id.
        Returns:
        true if the operation succeeded, false if not
      • toString

        public String toString()
        Deprecated.
        Gets the String representation of the contents of the Item. The format of the string is a space separated catenation of the String representations of the Properties contained by the Item.
        Overrides:
        toString in class Object
        Returns:
        String representation of the Item contents
      • getListeners

        public Collection<?> getListeners​(Class<?> eventType)
        Deprecated.
      • clone

        public Object clone()
                     throws CloneNotSupportedException
        Deprecated.
        Creates and returns a copy of this object.

        The method clone performs a shallow copy of the PropertysetItem.

        Note : All arrays are considered to implement the interface Cloneable. Otherwise, this method creates a new instance of the class of this object and initializes all its fields with exactly the contents of the corresponding fields of this object, as if by assignment, the contents of the fields are not themselves cloned. Thus, this method performs a "shallow copy" of this object, not a "deep copy" operation.

        Overrides:
        clone in class Object
        Throws:
        CloneNotSupportedException - if the object's class does not support the Cloneable interface.
        See Also:
        Object.clone()
      • equals

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

        public int hashCode()
        Deprecated.
        Overrides:
        hashCode in class Object