Interface IPortalEventFilter


  • @StableMinor(version="14.0",
                 sinceVersion="4.2")
    public interface IPortalEventFilter
    Filters IPortalEvent instances, indicating which ones should be accepted.

    PortalEventFilters provides methods for obtaining commonly used filters.

    Since:
    4.1.0
    Version:
    $Revision: 24477 $ $Date: 2021-04-28 11:30:36 -0300 (Wed, 28 Apr 2021) $
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      boolean accept​(IPortalEvent event)
      Indicates if the given event is accepted.
      boolean equals​(Object obj)
      Indicates whether this filter accepts the same events as the other filter given.
      int hashCode()
      Filters that implement equals method must also implement this method to return the same hash codes to the filters they are equal to.
    • Method Detail

      • accept

        boolean accept​(IPortalEvent event)
        Indicates if the given event is accepted.

        Important: The implementation of this method must not be time consuming, as it may impact the overall time response of the portal.

        Parameters:
        event - the event.
        Returns:
        true if accepted, false otherwise.
        Since:
        4.1.0
      • equals

        boolean equals​(Object obj)
        Indicates whether this filter accepts the same events as the other filter given.

        This method should return true only if it is known that both filters will accept the same events. If such information is not known, this method should return false.

        Note that it is generally necessary to override the hashCode() method whenever this method is overridden, so as to maintain the general contract for the hashCode method, which states that equal objects must have equal hash codes.

        Overrides:
        equals in class Object
        Parameters:
        obj - the other filter.
        Returns:
        true if the given object is a filter that accepts the same events as this one.
        Since:
        4.1.0
      • hashCode

        int hashCode()
        Filters that implement equals method must also implement this method to return the same hash codes to the filters they are equal to. This is necessary to maintain the general contract for the hashCode method.
        Overrides:
        hashCode in class Object
        Returns:
        the hash code value for this object.
        Since:
        4.1.0
        See Also:
        equals(Object)