net.java.sen.filter.reading
Class OverrideFilter

java.lang.Object
  extended by net.java.sen.filter.reading.OverrideFilter
All Implemented Interfaces:
ReadingFilter

public class OverrideFilter
extends Object
implements ReadingFilter

A reading filter that overrides decisions on reading visibility made by earlier filters. Typically this filter will be set as the last in a chain of filters to allow changes to be made interactively


Constructor Summary
OverrideFilter()
           
 
Method Summary
 void filterReadings(List<Token> tokens, ReadingNode readingNode)
          Filters readings
 void reset()
          Resets any sentence specific state held by the filter.
 void setVisible(int position, Boolean visible)
          Sets a visibility override at a given character index
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OverrideFilter

public OverrideFilter()
Method Detail

filterReadings

public void filterReadings(List<Token> tokens,
                           ReadingNode readingNode)
Description copied from interface: ReadingFilter
Filters readings

Specified by:
filterReadings in interface ReadingFilter
Parameters:
tokens - The tokens to which the readings are applied
readingNode - The head of a list of ReadingNodes

reset

public void reset()
Description copied from interface: ReadingFilter
Resets any sentence specific state held by the filter. The implementing filter decides exactly what state is affected, and may choose, for instance, to exclude state relating to global or persistant settings

Specified by:
reset in interface ReadingFilter

setVisible

public void setVisible(int position,
                       Boolean visible)
Sets a visibility override at a given character index

Parameters:
position - The position to set the override at
visible - The visibility to set. null removes the override


Copyright © 2012. All Rights Reserved.