es.ants.felixgm.trmsim_wsn.satisfaction
Class SatisfactionBinary

java.lang.Object
  extended by es.ants.felixgm.trmsim_wsn.satisfaction.SatisfactionBinary
All Implemented Interfaces:
Satisfaction

public class SatisfactionBinary
extends java.lang.Object
implements Satisfaction

This class models a binary representation of the satisfaction of a client with a received service. This satisfaction can only take two values: satisfied (true) or unsatisfied (false)

Since:
0.2
Version:
0.4
Author:
Félix Gómez Mármol, Gregorio Martínez Pérez

Constructor Summary
SatisfactionBinary(boolean satisfied)
          Class SatisfactionBinary constructor
 
Method Summary
 Satisfaction aggregate(Satisfaction satisfaction)
          This method aggregates this satisfaction with the given one
 boolean isSatisfied()
          This method indicates if this Satisfaction object represents a satisfactory or unsatisfactory transaction
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SatisfactionBinary

public SatisfactionBinary(boolean satisfied)
Class SatisfactionBinary constructor

Parameters:
satisfied - Indicates if a client is satisfied with a received service (true) or not (false)
Method Detail

isSatisfied

public boolean isSatisfied()
Description copied from interface: Satisfaction
This method indicates if this Satisfaction object represents a satisfactory or unsatisfactory transaction

Specified by:
isSatisfied in interface Satisfaction
Returns:
true if this Satisfaction object represents a satisfactory transaction, false otherwise

aggregate

public Satisfaction aggregate(Satisfaction satisfaction)
Description copied from interface: Satisfaction
This method aggregates this satisfaction with the given one

Specified by:
aggregate in interface Satisfaction
Parameters:
satisfaction - Satisfaction to be aggregated with this satisfaction
Returns:
The aggregation of this satisfaction with the given one