es.ants.felixgm.trmsim_wsn.satisfaction
Class SatisfactionInterval

java.lang.Object
  extended by es.ants.felixgm.trmsim_wsn.satisfaction.SatisfactionInterval
All Implemented Interfaces:
Satisfaction
Direct Known Subclasses:
SatisfactionDiscreteScale

public class SatisfactionInterval
extends java.lang.Object
implements Satisfaction

This class models the representation of the satisfaction of a client with a received service, through an interval of real numbers

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

Constructor Summary
SatisfactionInterval(double min, double max, double value)
          Class SatisfactionInterval constructor
 
Method Summary
 Satisfaction aggregate(Satisfaction satisfaction)
          This method aggregates this satisfaction with the given one
 double getMax()
          This method returns the upper bound of the interval
 double getMin()
          This method returns the lower bound of the interval
 double getSatisfactionValue()
          Returns the actual satisfaction value
 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

SatisfactionInterval

public SatisfactionInterval(double min,
                            double max,
                            double value)
Class SatisfactionInterval constructor

Parameters:
min - Lower bound of the interval
max - Upper bound of the interval
value - Actual satisfaction value
Method Detail

getSatisfactionValue

public double getSatisfactionValue()
Returns the actual satisfaction value

Returns:
The actual satisfaction value

getMin

public double getMin()
This method returns the lower bound of the interval

Returns:
The lower bound of the interval

getMax

public double getMax()
This method returns the upper bound of the interval

Returns:
The upper bound of the interval

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