On 01 Jul 2009, at 14:36, adelme...@apache.org wrote:
Author: adelmelle
Date: Wed Jul 1 12:36:17 2009
New Revision: 790142
URL: http://svn.apache.org/viewvc?rev=790142&view=rev
Log:
Some cleanups and attempts at improving code-readability and -
extensibility:
All of those open to interpretation, of course...
* extracted blocks of code in BreakingAlgorithm.findBreakingPoints()
into protected methods. Following the already existing handleBox(),
added handleGlueAt() and handlePenaltyAt() to provide extension
points to subclasses. Extraction of the code-blocks related to the
node-recovery mechanism.
FWIW: I have also been playing with the idea of using a more general
handleElementAt() pattern, with (almost) identical signatures, apart
from the type of the first parameter...
Basic intention remains: following the step made by handleBox(), give
subclasses the opportunity to extend the default behavior. For
penalties, this will turn out handy/important to deal with column-keeps.
* extracted blocks of code in BreakingAlgorithm.considerLegalBreak()
into protected methods: deactivateNode(), activateNode() and
forceNode()
I was not sure of the naming here, just took whatever seemed cool.
registerNode() instead of activateNode() came to mind...
Regards,
Andreas Delmelle
mailto:andreas.delmelle.AT.telenet.be
jabber: mandr...@jabber.org
skype: adlm0608
---