Mercurial > dive4elements > river
comparison artifacts/src/main/java/org/dive4elements/river/artifacts/access/ExtremeAccess.java @ 8202:e4606eae8ea5
sed src/**/*.java 's/logger/log/g'
author | Sascha L. Teichmann <teichmann@intevation.de> |
---|---|
date | Fri, 05 Sep 2014 12:58:17 +0200 |
parents | 29dc6b6e7199 |
children | 5e38e2924c07 |
comparison
equal
deleted
inserted
replaced
8201:4b8c5a08de04 | 8202:e4606eae8ea5 |
---|---|
21 | 21 |
22 /** Access data used for extreme value analysis. */ | 22 /** Access data used for extreme value analysis. */ |
23 public class ExtremeAccess | 23 public class ExtremeAccess |
24 extends RangeAccess | 24 extends RangeAccess |
25 { | 25 { |
26 /** Our private logger. */ | 26 /** Our private log. */ |
27 private static Logger logger = Logger.getLogger(ExtremeAccess.class); | 27 private static Logger log = Logger.getLogger(ExtremeAccess.class); |
28 | 28 |
29 protected Long start; | 29 protected Long start; |
30 protected Long end; | 30 protected Long end; |
31 | 31 |
32 protected Double percent; | 32 protected Double percent; |
46 | 46 |
47 if (percent == null) { | 47 if (percent == null) { |
48 percent = getDouble("percent"); | 48 percent = getDouble("percent"); |
49 } | 49 } |
50 | 50 |
51 if (logger.isDebugEnabled()) { | 51 if (log.isDebugEnabled()) { |
52 logger.debug("percent: '" + percent + "'"); | 52 log.debug("percent: '" + percent + "'"); |
53 } | 53 } |
54 | 54 |
55 return percent; | 55 return percent; |
56 } | 56 } |
57 | 57 |
58 public String getFunction() { | 58 public String getFunction() { |
59 if (function == null) { | 59 if (function == null) { |
60 function = getString("function"); | 60 function = getString("function"); |
61 } | 61 } |
62 | 62 |
63 if (logger.isDebugEnabled()) { | 63 if (log.isDebugEnabled()) { |
64 logger.debug("function: '" + function + "'"); | 64 log.debug("function: '" + function + "'"); |
65 } | 65 } |
66 | 66 |
67 return function; | 67 return function; |
68 } | 68 } |
69 | 69 |
71 /** Find first RangeWithValues for which the given location | 71 /** Find first RangeWithValues for which the given location |
72 * is within the range and return its values. | 72 * is within the range and return its values. |
73 * @return values of first suitable rangewithvalues or null. | 73 * @return values of first suitable rangewithvalues or null. |
74 */ | 74 */ |
75 public double[] getValuesForRange(double location) { | 75 public double[] getValuesForRange(double location) { |
76 logger.debug("ExtemeAcces.getValuesForRange"); | 76 log.debug("ExtemeAcces.getValuesForRange"); |
77 for (RangeWithValues rangeValues: getRanges()) { | 77 for (RangeWithValues rangeValues: getRanges()) { |
78 if (rangeValues.inside(location)) { | 78 if (rangeValues.inside(location)) { |
79 return rangeValues.getValues(); | 79 return rangeValues.getValues(); |
80 } | 80 } |
81 } | 81 } |
97 ranges.add(new RangeWithValues(from, to, values)); | 97 ranges.add(new RangeWithValues(from, to, values)); |
98 } | 98 } |
99 }); | 99 }); |
100 } | 100 } |
101 | 101 |
102 if (logger.isDebugEnabled()) { | 102 if (log.isDebugEnabled()) { |
103 logger.debug("ranges: " + ranges); | 103 log.debug("ranges: " + ranges); |
104 } | 104 } |
105 | 105 |
106 return ranges; | 106 return ranges; |
107 } | 107 } |
108 } | 108 } |