EMMA Coverage Report (generated Sun Feb 05 10:43:15 CET 2012)
[all classes][de.uka.ipd.sdq.dsexplore.opt4j.representation]

COVERAGE SUMMARY FOR SOURCE FILE [DSEConstraint.java]

nameclass, %method, %block, %line, %
DSEConstraint.java0%   (0/1)0%   (0/3)0%   (0/52)0%   (0/13)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class DSEConstraint0%   (0/1)0%   (0/3)0%   (0/52)0%   (0/13)
<static initializer> 0%   (0/1)0%   (0/4)0%   (0/3)
DSEConstraint (Value, Value, Objective): void 0%   (0/1)0%   (0/12)0%   (0/5)
isValid (Value): boolean 0%   (0/1)0%   (0/36)0%   (0/5)

1package de.uka.ipd.sdq.dsexplore.opt4j.representation;
2 
3import org.apache.log4j.Logger;
4import org.opt4j.core.Objective;
5import org.opt4j.core.Value;
6 
7public class DSEConstraint {
8        
9        private Value<Double> lowerLimit;
10        private Value<Double> upperLimit;
11        private Objective objective;
12        
13        /** Logger for log4j. */
14        private static Logger logger = 
15                Logger.getLogger("de.uka.ipd.sdq.dsexplore");
16        
17        
18        public DSEConstraint(Value<Double> lowerLimit, Value<Double> upperLimit,
19                        Objective objective) {
20                super();
21                this.lowerLimit = lowerLimit;
22                this.upperLimit = upperLimit;
23                this.objective = objective;
24        }
25        
26        public boolean isValid(Value<Double> value){
27                if ((lowerLimit == null || lowerLimit.compareTo((Value<Double>) value)<=0)
28                                &&
29                        (upperLimit == null || upperLimit.compareTo((Value<Double>) value)>=0)){
30                        return true;
31                } else {
32                        logger.info("Objective "+objective.getName()+" does not fulfill the requirements with a value of "+value.toString());
33                        return false;
34                }
35        }
36 
37}

[all classes][de.uka.ipd.sdq.dsexplore.opt4j.representation]
EMMA 2.0.9414 (unsupported private build) (C) Vladimir Roubtsov