To implement a subclass of Quantizer, you should override either quantizeSingle (if your quantizer is simple enough only to have to look at a single event at a time) or quantizeRange. The default implementation of quantizeRange simply calls quantizeSingle on each non-rest event in turn. The default implementation of quantizeSingle, as you see, does nothing.
Note that implementations of these methods should call getFromSource and setToTarget to get and set the unquantized and quantized data; they should not query the event properties or timings directly.
NOTE: It is vital that ordering is maintained after quantization. That is, an event whose absolute time quantizes to a time t must appear in the original segment before all events whose times quantize to greater than t. This means you must quantize the absolute times of non-note events as well as notes. You don't need to worry about quantizing rests, however; they're only used for notation and will be automatically recalculated if the notation quantization values are seen to change.
Referenced by quantizeRange().