org.jactr.modules.pm.visual.visicon.filter
Class AttendedVisualLocationFilter

java.lang.Object
  extended by org.jactr.modules.pm.visual.visicon.filter.AbstractVisualLocationFilter<java.lang.Boolean>
      extended by org.jactr.modules.pm.visual.visicon.filter.AttendedVisualLocationFilter
All Implemented Interfaces:
IVisualLocationFilter

public class AttendedVisualLocationFilter
extends AbstractVisualLocationFilter<java.lang.Boolean>

dumb filter that is only provided to normalize the :attended visual searches. The FINST feature map will actually do the heavy lifting here..

Author:
harrison

Field Summary
 
Fields inherited from interface org.jactr.modules.pm.visual.visicon.filter.IVisualLocationFilter
IRRELEVANT_WEIGHT
 
Constructor Summary
AttendedVisualLocationFilter()
           
 
Method Summary
 boolean accept(ChunkTypeRequest visualLocationTemplate)
          always return true.
 int configure(ChunkTypeRequest searchRequest)
          Attempt to configure this filter based on the search request.
 java.util.Comparator<ChunkTypeRequest> getComparator()
          return the comparator that will be returned if configure returned something other than IVisualLocationFilter.IRRELEVANT_WEIGHT.
 void normalizeSearch(ChunkTypeRequest searchRequest)
          First stage of processing, all filters will have this called to allow the filter to make slight modifications to the search request to resolve special values (i.e.
 
Methods inherited from class org.jactr.modules.pm.visual.visicon.filter.AbstractVisualLocationFilter
setVisualMap
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AttendedVisualLocationFilter

public AttendedVisualLocationFilter()
Method Detail

normalizeSearch

public void normalizeSearch(ChunkTypeRequest searchRequest)
Description copied from interface: IVisualLocationFilter
First stage of processing, all filters will have this called to allow the filter to make slight modifications to the search request to resolve special values (i.e. current value in visual searches is normalized to the actual visual-location chunk).

Specified by:
normalizeSearch in interface IVisualLocationFilter
Overrides:
normalizeSearch in class AbstractVisualLocationFilter<java.lang.Boolean>

accept

public boolean accept(ChunkTypeRequest visualLocationTemplate)
always return true. if we've gotten this far then the FINST feature map has already set the location as valid.

Parameters:
visualLocationTemplate -
Returns:
See Also:
IVisualLocationFilter.accept(org.jactr.core.production.request.ChunkTypeRequest)

configure

public int configure(ChunkTypeRequest searchRequest)
Description copied from interface: IVisualLocationFilter
Attempt to configure this filter based on the search request. If this filter is irrelevant to the request (i.e. it can't filter based on the provided constraints), it should return IVisualLocationFilter.IRRELEVANT_WEIGHT, makring it as irrelevant currently. Otherwise, it should return the priority of the comparator, the lower the more important. Typically the weight/priority is the same as the index of the slot the filter is configured as (i.e. if nearest current is first, it will be the first sort criterion).

Returns:
weight or IVisualLocationFilter.IRRELEVANT_WEIGHT

getComparator

public java.util.Comparator<ChunkTypeRequest> getComparator()
Description copied from interface: IVisualLocationFilter
return the comparator that will be returned if configure returned something other than IVisualLocationFilter.IRRELEVANT_WEIGHT. However, it need not return a comparator at all if it just wants to filter and not sort.

Returns: