com.timeindexing.appl
Class SelectionValidationCode

java.lang.Object
  extended bycom.timeindexing.appl.SelectionValidationCode

public class SelectionValidationCode
extends java.lang.Object

This generates a validation code for an IndexView. It can be used at playback time to detemine if the correct selection has been requested.


Constructor Summary
SelectionValidationCode()
          Construct a SelectionValidationCode object.
 
Method Summary
 long generate(IndexView selection)
          Generate a code for a particular selection, specified as the IndexView returned by index.selection().
 boolean validate(IndexView selection, long code)
          Validate a code given a selection.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SelectionValidationCode

public SelectionValidationCode()
Construct a SelectionValidationCode object.

Method Detail

generate

public long generate(IndexView selection)
Generate a code for a particular selection, specified as the IndexView returned by index.selection().

Returns:
0 if there is no first or last position

validate

public boolean validate(IndexView selection,
                        long code)
Validate a code given a selection.