Class RelationshipController
java.lang.Object
com.dna.jopt.member.bucket.entity.controller.relationship.RelationshipController
- All Implemented Interfaces:
IRelationshipController,Serializable
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddRelationShipCost(double addCost) Adds therelationship costto the already existingrelationship cost.voidAdds the inputILogicRouteElementDetailItemon thenode2DetailsPersistendMapas well as on thenode2DetailsMap.voidcleanLostRelations(List<IOptimizationElement> unassignedNodes) copy()Returns a copy of theIRelationshipController.intGets the number of violations of all relations in the relation to cost item map, as each relation counted them at its last check.Gets the persistent map with theIOptimizationElementand theILogicRouteElementDetailItem.Gets the map containing allINode2NodeRelationsand the linkedcostdoubleGets therelationship cost.Gets theOptionalILogicRouteElementDetailItem.Returns a copy of theIRelationshipController.voidputRelation2CostItem(INode2NodeRelation rel, RelationShipCostItem costitem) Puts a cost of a certainINode2NodeRelationin the map.booleanremoveRelation2CostItem(INode2NodeRelation rel, RelationShipCostItem costitem) Removes the cost item of a certainINode2NodeRelationfrom the map if it is still the given item.voidSets the persistent map with theIOptimizationElementand theILogicRouteElementDetailItem.voidSets theINode2NodeRelationtocostitem map.voidsetRelationShipCost(double cost) Sets the relationship cost.voidSets the map with theIOptimizationElementand theILogicRouteElementDetailItem.
-
Field Details
-
MAX_RELATIONSHIPCOST
public static final double MAX_RELATIONSHIPCOST- See Also:
-
-
Constructor Details
-
RelationshipController
public RelationshipController()
-
-
Method Details
-
putRelation2CostItem
Description copied from interface:IRelationshipControllerPuts a cost of a certainINode2NodeRelationin the map.- Specified by:
putRelation2CostItemin interfaceIRelationshipController- Parameters:
rel- the iNode2NodeRelationcostitem- the double cost
-
removeRelation2CostItem
Description copied from interface:IRelationshipControllerRemoves the cost item of a certainINode2NodeRelationfrom the map if it is still the given item.- Specified by:
removeRelation2CostItemin interfaceIRelationshipController- Parameters:
rel- the iNode2NodeRelationcostitem- the cost item to remove- Returns:
- true if the item was removed
-
getRelation2CostItemMap
Description copied from interface:IRelationshipControllerGets the map containing allINode2NodeRelationsand the linkedcost- Specified by:
getRelation2CostItemMapin interfaceIRelationshipController- Returns:
- the relation to cost item map
-
setRelation2CostItemMap
Description copied from interface:IRelationshipControllerSets theINode2NodeRelationtocostitem map.- Specified by:
setRelation2CostItemMapin interfaceIRelationshipController- Parameters:
map- the map to set
-
setRelationShipCost
public void setRelationShipCost(double cost) Description copied from interface:IRelationshipControllerSets the relationship cost.- Specified by:
setRelationShipCostin interfaceIRelationshipController- Parameters:
cost- the double new relation ship cost
-
getRelationShipCost
public double getRelationShipCost()Description copied from interface:IRelationshipControllerGets therelationship cost.- Specified by:
getRelationShipCostin interfaceIRelationshipController- Returns:
- the relation ship cost
-
getNumRelationViolations
public int getNumRelationViolations()Description copied from interface:IRelationshipControllerGets the number of violations of all relations in the relation to cost item map, as each relation counted them at its last check. Like therelationship costit also covers the relations that the last assessment did not check again.- Specified by:
getNumRelationViolationsin interfaceIRelationshipController- Returns:
- the number of relation violations
-
addRelationShipCost
public void addRelationShipCost(double addCost) Description copied from interface:IRelationshipControllerAdds therelationship costto the already existingrelationship cost.- Specified by:
addRelationShipCostin interfaceIRelationshipController- Parameters:
addCost- the double cost to add
-
cleanLostRelations
- Specified by:
cleanLostRelationsin interfaceIRelationshipController
-
addRelationShipDetails
Description copied from interface:IRelationshipControllerAdds the inputILogicRouteElementDetailItemon thenode2DetailsPersistendMapas well as on thenode2DetailsMap.- Specified by:
addRelationShipDetailsin interfaceIRelationshipController- Parameters:
details- the iLogicRouteElementDetailItem to add
-
getRelationShipDetails
Description copied from interface:IRelationshipControllerGets theOptionalILogicRouteElementDetailItem.If the
node2DetailsMapis empty returnsnode2DetailsPersistendMap.- Specified by:
getRelationShipDetailsin interfaceIRelationshipController- Parameters:
el- the iLogicRouteElementDetailItem of theILogicRouteElementDetailItem- Returns:
- the map
-
getRelationShipDetailMap
Description copied from interface:IRelationshipController- Specified by:
getRelationShipDetailMapin interfaceIRelationshipController- Returns:
- the map
-
setRelationShipDetailMap
Description copied from interface:IRelationshipControllerSets the map with theIOptimizationElementand theILogicRouteElementDetailItem.- Specified by:
setRelationShipDetailMapin interfaceIRelationshipController- Parameters:
map- the map to set
-
getPersistendRelationShipDetailMap
Description copied from interface:IRelationshipControllerGets the persistent map with theIOptimizationElementand theILogicRouteElementDetailItem.- Specified by:
getPersistendRelationShipDetailMapin interfaceIRelationshipController- Returns:
- the map
-
setPersistentRelationShipDetailMap
public void setPersistentRelationShipDetailMap(Map<IOptimizationElement, ILogicRouteElementDetailItem> map) Description copied from interface:IRelationshipControllerSets the persistent map with theIOptimizationElementand theILogicRouteElementDetailItem.- Specified by:
setPersistentRelationShipDetailMapin interfaceIRelationshipController- Parameters:
map- the map to set
-
partialCopy
Description copied from interface:IRelationshipControllerReturns a copy of theIRelationshipController.- Specified by:
partialCopyin interfaceIRelationshipController- Returns:
- the controller
-
copy
Description copied from interface:IRelationshipControllerReturns a copy of theIRelationshipController.- Specified by:
copyin interfaceIRelationshipController- Returns:
- the copy
-