Leverage Map Ref in PCE PostAlgoPathValidator 79/104379/9
authorguillaume.lambert <guillaume.lambert@orange.com>
Mon, 20 Feb 2023 12:27:46 +0000 (13:27 +0100)
committerguillaume.lambert <guillaume.lambert@orange.com>
Wed, 1 Mar 2023 12:48:35 +0000 (13:48 +0100)
commitc59456d5a7cce5c3f6f1ac9682d702c8b35b496d
tree40cdb64ada58ca01e2770fdb436b67d19f388fdd
parentf8af92b07402b1d0f7087024d0a6d07f06089935
Leverage Map Ref in PCE PostAlgoPathValidator

CatalogUtils compute many signal parameters stored with double values.
They are passed to many methods arguments and modified in many places
in PCE PostAlgoPathValidator.
Leveraging Map references to group these double values would help to
simplify the code by avoiding long list of such parameters
and allowing their values to be modified directly inside intermediate
functions.

TODO:
Ideally, this work should be generalized to the whole CatalogUtils
class. Also as Double is immutable, it prevents from updating directly
Map values here. Apache proposes a MutableDouble alternative.
Of course, there is still the possibility to use double[] arrays.
But w/o key names to describe, the code reading will be harder.

JIRA: TRNSPRTPCE-725
Change-Id: Iff3cf98d82cb53dc3cc89714b92a2e3bf77157fb
Signed-off-by: guillaume.lambert <guillaume.lambert@orange.com>
pce/src/main/java/org/opendaylight/transportpce/pce/graph/PostAlgoPathValidator.java