comparison artifacts/src/main/java/org/dive4elements/river/artifacts/states/RangeState.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 a0078e5e3b39
children 1116079e6624
comparison
equal deleted inserted replaced
8201:4b8c5a08de04 8202:e4606eae8ea5
21 * State in which km range is set. 21 * State in which km range is set.
22 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a> 22 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a>
23 */ 23 */
24 public abstract class RangeState extends DefaultState { 24 public abstract class RangeState extends DefaultState {
25 25
26 /** The logger that is used in this class. */ 26 /** The log that is used in this class. */
27 private Logger logger = Logger.getLogger(RangeState.class); 27 private Logger log = Logger.getLogger(RangeState.class);
28 28
29 29
30 public RangeState() { 30 public RangeState() {
31 } 31 }
32 32
37 double fromValid, double toValid, 37 double fromValid, double toValid,
38 double from, double to) 38 double from, double to)
39 throws IllegalArgumentException 39 throws IllegalArgumentException
40 { 40 {
41 if (from < fromValid) { 41 if (from < fromValid) {
42 logger.error( 42 log.error(
43 "Invalid 'from'. " + from + " is smaller than " + fromValid); 43 "Invalid 'from'. " + from + " is smaller than " + fromValid);
44 throw new IllegalArgumentException("error_feed_from_out_of_range"); 44 throw new IllegalArgumentException("error_feed_from_out_of_range");
45 } 45 }
46 else if (to > toValid) { 46 else if (to > toValid) {
47 logger.error( 47 log.error(
48 "Invalid 'to'. " + to + " is bigger than " + toValid); 48 "Invalid 'to'. " + to + " is bigger than " + toValid);
49 throw new IllegalArgumentException("error_feed_to_out_of_range"); 49 throw new IllegalArgumentException("error_feed_to_out_of_range");
50 } 50 }
51 51
52 return true; 52 return true;
67 protected boolean validateBounds( 67 protected boolean validateBounds(
68 double fromValid, double toValid, 68 double fromValid, double toValid,
69 double from, double to, double step) 69 double from, double to, double step)
70 throws IllegalArgumentException 70 throws IllegalArgumentException
71 { 71 {
72 logger.debug("RangeState.validateRange"); 72 log.debug("RangeState.validateRange");
73 73
74 // XXX The step width is not validated at the moment! 74 // XXX The step width is not validated at the moment!
75 return validateBounds(fromValid, toValid, from, to); 75 return validateBounds(fromValid, toValid, from, to);
76 } 76 }
77 77

http://dive4elements.wald.intevation.org