1 package org.opentrafficsim.xml.bindings;
2
3 import org.djunits.value.vdouble.scalar.Length;
4 import org.djutils.logger.CategoryLogger;
5
6
7
8
9
10
11
12
13
14
15 public class LengthAdapter extends UnitAdapter<Length>
16 {
17
18 @Override
19 public Length unmarshal(final String field) throws IllegalArgumentException
20 {
21 try
22 {
23 return Length.valueOf(field);
24 }
25 catch (Exception exception)
26 {
27 CategoryLogger.always().error(exception, "Problem parsing Length '" + field + "'");
28 throw exception;
29 }
30 }
31
32 }