de.cesr.lara.components.decision.impl
Class LLightBoRow<BO extends LaraBehaviouralOption<?,?>>

java.lang.Object
  extended by de.cesr.lara.components.decision.impl.LLightBoRow<BO>
All Implemented Interfaces:
LaraBoRow<BO>

public class LLightBoRow<BO extends LaraBehaviouralOption<?,?>>
extends Object
implements LaraBoRow<BO>

This implementation of LaraBoRow does not store values for every preference but only the sum. Therefore, it may not be suitable for any comprehensive deliberative choice component or post-processing.


Field Summary
protected  BO bo
           
protected  double utilitySum
           
 
Constructor Summary
LLightBoRow(BO bo)
           
LLightBoRow(BO bo, double utilitySum)
           
 
Method Summary
 BO getBehaviouralOption()
           
 double getIndividualUtilityValue(Class<? extends LaraPreference> preference)
          Provides the individual utility values regarding the given preference.
 double getSum()
           
 void setIndividualUtilityValue(Class<? extends LaraPreference> preference, double value)
          Adds a individual utility values regarding a given preference.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

bo

protected BO extends LaraBehaviouralOption<?,?> bo

utilitySum

protected double utilitySum
Constructor Detail

LLightBoRow

public LLightBoRow(BO bo)
Parameters:
bo - behavioural option

LLightBoRow

public LLightBoRow(BO bo,
                   double utilitySum)
Parameters:
bo - behavioural option
utilitySum - sum of all individual utility values
Method Detail

getBehaviouralOption

public BO getBehaviouralOption()
Specified by:
getBehaviouralOption in interface LaraBoRow<BO extends LaraBehaviouralOption<?,?>>
Returns:
the behavioural option this row represents
See Also:
LaraBoRow.getBehaviouralOption()

getIndividualUtilityValue

public double getIndividualUtilityValue(Class<? extends LaraPreference> preference)
Description copied from interface: LaraBoRow
Provides the individual utility values regarding the given preference.

Specified by:
getIndividualUtilityValue in interface LaraBoRow<BO extends LaraBehaviouralOption<?,?>>
Returns:
individual utility value
See Also:
LaraBoRow.getIndividualUtilityValue(java.lang.Class)

getSum

public double getSum()
Specified by:
getSum in interface LaraBoRow<BO extends LaraBehaviouralOption<?,?>>
Returns:
the sum of all individual utility values
See Also:
LaraBoRow.getSum()

setIndividualUtilityValue

public void setIndividualUtilityValue(Class<? extends LaraPreference> preference,
                                      double value)
Description copied from interface: LaraBoRow
Adds a individual utility values regarding a given preference.

Specified by:
setIndividualUtilityValue in interface LaraBoRow<BO extends LaraBehaviouralOption<?,?>>
See Also:
LaraBoRow.setIndividualUtilityValue(java.lang.Class, double)

toString

public String toString()
Overrides:
toString in class Object