01: /* Copyright (c) 2001 - 2007 TOPP - www.openplans.org. All rights reserved.
02: * This code is licensed under the GPL 2.0 license, availible at the root
03: * application directory.
04: */
05: package org.geoserver.ows.kvp;
06:
07: import org.geoserver.ows.KvpParser;
08:
09: /**
10: * Parses double kvp's of the form 'key=<double>'.
11: * <p>
12: *
13: * </p>
14: * @author Justin Deoliveira, The Open Planning Project, jdeolive@openplans.org
15: *
16: */
17: public class DoubleKvpParser extends KvpParser {
18: /**
19: * Creates the parser specifying the name of the key to latch to.
20: *
21: * @param key The key whose associated value to parse.
22: */
23: public DoubleKvpParser(String key) {
24: super (key, Double.class);
25: }
26:
27: public Object parse(String value) throws Exception {
28: return Double.valueOf(value);
29: }
30: }
|