Class GeneratedPropertyContainer.GeneratedPropertyItem

    • Constructor Detail

      • GeneratedPropertyItem

        protected GeneratedPropertyItem​(Object itemId,
                                        Item item)
    • Method Detail

      • getItemProperty

        public Property getItemProperty​(Object id)
        Description copied from interface: Item
        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 - identifier of the Property to get
        Returns:
        the Property with the given ID or null
      • getItemPropertyIds

        public Collection<?> getItemPropertyIds()
        Description copied from interface: Item
        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
      • addItemProperty

        public boolean addItemProperty​(Object id,
                                       Property property)
                                throws UnsupportedOperationException
        Description copied from interface: Item
        Tries to add a new Property into the Item.

        This functionality is optional.

        Specified by:
        addItemProperty in interface Item
        Parameters:
        id - 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
        Throws:
        UnsupportedOperationException - if the operation is not supported.
      • removeItemProperty

        public boolean removeItemProperty​(Object id)
                                   throws UnsupportedOperationException
        Description copied from interface: Item
        Removes the Property identified by ID from the Item.

        This functionality is optional.

        Specified by:
        removeItemProperty in interface Item
        Parameters:
        id - ID of the Property to be removed
        Returns:
        true if the operation succeeded
        Throws:
        UnsupportedOperationException - if the operation is not supported. false if not
      • equals

        public boolean equals​(Object obj)
        Tests if the given object is the same as the this object. Two Items from the same container with the same ID are equal.
        Overrides:
        equals in class Object
        Parameters:
        obj - an object to compare with this object
        Returns:
        true if the given object is the same as this object, false if not
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • getWrappedItem

        public Item getWrappedItem()
        Returns the wrapped Item that belongs to the wrapped container
        Returns:
        wrapped item.
        Since:
        7.6.8