}
@Override
public void handle(Input input)
{
final VoteResult in = (VoteResult)input;
logger.log(Level.FINE, "I, agent {0} got {1} for my {2} proposal.",
new Object[]
{
dm.getName(),
in.getVotes(), in.getProposition().getType()
});
dm.setCurrentHappiness(updateHappinessAfterVotes(in.getProposition(),
in.getVotes(), in.getOverallMovement()));
dm.setCurrentLoyalty(updateLoyaltyAfterVotes(in.getProposition(),
in.getVotes(), in.getOverallMovement()));
dm.setSocialBelief(updateSocialBeliefAfterVotes(in.getProposition(),
in.getVotes(), in.getOverallMovement()));
dm.setEconomicBelief(updateEconomicBeliefAfterVotes(in.getProposition(),
in.getVotes(), in.getOverallMovement()));
Map<String, Double> t = updateTrustAfterVotes(in.getProposition(),
in.getVotes(), in.getOverallMovement());
if (t == null) return;
for (String agent : t.keySet())
{
dm.setTrust(agent, t.get(agent));
}