Class SpecificFilterImpl

  • All Implemented Interfaces:
    Filter, IndexedFilter

    public class SpecificFilterImpl
    extends java.lang.Object
    implements IndexedFilter
    This is a filter that matches an exact descriptor
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.lang.String contract  
      private long id  
      private long locatorId  
      private java.lang.String name  
    • Constructor Summary

      Constructors 
      Constructor Description
      SpecificFilterImpl​(java.lang.String contract, java.lang.String name, long id, long locatorId)
      For matching an exact descriptor
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getAdvertisedContract()
      If this returns non-null then this index will be used to limit the set of Descriptors that will be passed to the matches method.
      java.lang.String getName()
      If this returns non-null then this name will be used to limit the set of Descriptors that will be passed to the matches method.
      boolean matches​(Descriptor d)
      Returns true if this filter matches the given object
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • contract

        private final java.lang.String contract
      • name

        private final java.lang.String name
      • id

        private final long id
      • locatorId

        private final long locatorId
    • Constructor Detail

      • SpecificFilterImpl

        public SpecificFilterImpl​(java.lang.String contract,
                                  java.lang.String name,
                                  long id,
                                  long locatorId)
        For matching an exact descriptor
        Parameters:
        contract -
        name -
        id -
        locatorId -
    • Method Detail

      • matches

        public boolean matches​(Descriptor d)
        Description copied from interface: Filter
        Returns true if this filter matches the given object
        Specified by:
        matches in interface Filter
        Parameters:
        d - The object to match against this filter. May not be null
        Returns:
        true if this filter matches the object
      • getAdvertisedContract

        public java.lang.String getAdvertisedContract()
        Description copied from interface: IndexedFilter
        If this returns non-null then this index will be used to limit the set of Descriptors that will be passed to the matches method. Only those descriptors that have an AdverisedContract of this value will be passed to the matches method.
        Specified by:
        getAdvertisedContract in interface IndexedFilter
        Returns:
        If non null this will limit the descriptors passed to the matches method to those that have this contract in their set of advertised contracts
      • getName

        public java.lang.String getName()
        Description copied from interface: IndexedFilter
        If this returns non-null then this name will be used to limit the set of Descriptors that will be passed to the matches method. Only those descriptors that has an name of this value will be passed to the matches method.
        Specified by:
        getName in interface IndexedFilter
        Returns:
        If non null this will limit the descriptors passed to the matches method to those that have name