Class Compare

    • Method Detail

      • passesFilter

        public boolean passesFilter​(Object itemId,
                                    Item item)
        Description copied from interface: Container.Filter
        Check if an item passes the filter (in-memory filtering).
        Specified by:
        passesFilter in interface Container.Filter
        Parameters:
        itemId - identifier of the item being filtered; may be null when the item is being added to the container
        item - the item being filtered
        Returns:
        true if the item is accepted by this filter
      • compareValue

        protected int compareValue​(Object value1)
      • appliesToProperty

        public boolean appliesToProperty​(Object propertyId)
        Description copied from interface: Container.Filter
        Check if a change in the value of a property can affect the filtering result. May always return true, at the cost of performance. If the filter cannot determine whether it may depend on the property or not, should return true.
        Specified by:
        appliesToProperty in interface Container.Filter
        Returns:
        true if the filtering result may/does change based on changes to the property identified by propertyId
      • hashCode

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

        public Object getPropertyId()
        Returns the property id of the property to compare against the fixed value.
        Returns:
        property id (not null)
      • getValue

        public Object getValue()
        Returns the value to compare the property against.
        Returns:
        comparison reference value