View Javadoc
1   package org.djutils.cli;
2   
3   import javax.annotation.Generated;
4   
5   import org.djunits.value.vdouble.scalar.AbsoluteTemperature;
6   import org.djunits.value.vdouble.scalar.AbsorbedDose;
7   import org.djunits.value.vdouble.scalar.Acceleration;
8   import org.djunits.value.vdouble.scalar.AmountOfSubstance;
9   import org.djunits.value.vdouble.scalar.Angle;
10  import org.djunits.value.vdouble.scalar.AngularAcceleration;
11  import org.djunits.value.vdouble.scalar.AngularVelocity;
12  import org.djunits.value.vdouble.scalar.Area;
13  import org.djunits.value.vdouble.scalar.CatalyticActivity;
14  import org.djunits.value.vdouble.scalar.Density;
15  import org.djunits.value.vdouble.scalar.Dimensionless;
16  import org.djunits.value.vdouble.scalar.Direction;
17  import org.djunits.value.vdouble.scalar.Duration;
18  import org.djunits.value.vdouble.scalar.ElectricalCapacitance;
19  import org.djunits.value.vdouble.scalar.ElectricalCharge;
20  import org.djunits.value.vdouble.scalar.ElectricalConductance;
21  import org.djunits.value.vdouble.scalar.ElectricalCurrent;
22  import org.djunits.value.vdouble.scalar.ElectricalInductance;
23  import org.djunits.value.vdouble.scalar.ElectricalPotential;
24  import org.djunits.value.vdouble.scalar.ElectricalResistance;
25  import org.djunits.value.vdouble.scalar.Energy;
26  import org.djunits.value.vdouble.scalar.EquivalentDose;
27  import org.djunits.value.vdouble.scalar.FlowMass;
28  import org.djunits.value.vdouble.scalar.FlowVolume;
29  import org.djunits.value.vdouble.scalar.Force;
30  import org.djunits.value.vdouble.scalar.Frequency;
31  import org.djunits.value.vdouble.scalar.Illuminance;
32  import org.djunits.value.vdouble.scalar.Length;
33  import org.djunits.value.vdouble.scalar.LinearDensity;
34  import org.djunits.value.vdouble.scalar.LuminousFlux;
35  import org.djunits.value.vdouble.scalar.LuminousIntensity;
36  import org.djunits.value.vdouble.scalar.MagneticFlux;
37  import org.djunits.value.vdouble.scalar.MagneticFluxDensity;
38  import org.djunits.value.vdouble.scalar.Mass;
39  import org.djunits.value.vdouble.scalar.Momentum;
40  import org.djunits.value.vdouble.scalar.Position;
41  import org.djunits.value.vdouble.scalar.Power;
42  import org.djunits.value.vdouble.scalar.Pressure;
43  import org.djunits.value.vdouble.scalar.RadioActivity;
44  import org.djunits.value.vdouble.scalar.SolidAngle;
45  import org.djunits.value.vdouble.scalar.Speed;
46  import org.djunits.value.vdouble.scalar.Temperature;
47  import org.djunits.value.vdouble.scalar.Time;
48  import org.djunits.value.vdouble.scalar.Torque;
49  import org.djunits.value.vdouble.scalar.Volume;
50  
51  import picocli.CommandLine;
52  import picocli.CommandLine.ITypeConverter;
53  
54  /**
55   * CliUnitConverters offers conversion methods for DJUNITS scalars so these can be used on the command line, e.g.:
56   * 
57   * <pre>
58   * java -jar ProgramApp.jar --timeout=5min
59   * </pre>
60   * 
61   * <br>
62   * Copyright (c) 2003-2018 Delft University of Technology, Jaffalaan 5, 2628 BX Delft, the Netherlands. All rights reserved. See
63   * for project information <a href="https://www.simulation.tudelft.nl/" target="_blank">www.simulation.tudelft.nl</a>. The
64   * source code and binary code of this software is proprietary information of Delft University of Technology.
65   * @author <a href="https://www.tudelft.nl/averbraeck" target="_blank">Alexander Verbraeck</a>
66   */
67  public final class CliUnitConverters
68  {
69      /** */
70      private CliUnitConverters()
71      {
72          // static utility class
73      }
74  
75      /**
76       * Register all DJUNITS converters for a CommandLine.
77       * @param cmd CommandLine; the CommandLine for which the DJUNITS converters should be registered
78       */
79      @Generated(value = "org.djunits.generator.GenerateCliConverters", date = "2020-01-17T12:27:20.797349900Z")
80      public static void registerAll(final CommandLine cmd)
81      {
82          cmd.registerConverter(AbsoluteTemperature.class, new ABSOLUTETEMPERATURE());
83          cmd.registerConverter(AbsorbedDose.class, new ABSORBEDDOSE());
84          cmd.registerConverter(Acceleration.class, new ACCELERATION());
85          cmd.registerConverter(AmountOfSubstance.class, new AMOUNTOFSUBSTANCE());
86          cmd.registerConverter(Angle.class, new ANGLE());
87          cmd.registerConverter(AngularAcceleration.class, new ANGULARACCELERATION());
88          cmd.registerConverter(AngularVelocity.class, new ANGULARVELOCITY());
89          cmd.registerConverter(Area.class, new AREA());
90          cmd.registerConverter(CatalyticActivity.class, new CATALYTICACTIVITY());
91          cmd.registerConverter(Density.class, new DENSITY());
92          cmd.registerConverter(Dimensionless.class, new DIMENSIONLESS());
93          cmd.registerConverter(Direction.class, new DIRECTION());
94          cmd.registerConverter(Duration.class, new DURATION());
95          cmd.registerConverter(ElectricalCapacitance.class, new ELECTRICALCAPACITANCE());
96          cmd.registerConverter(ElectricalCharge.class, new ELECTRICALCHARGE());
97          cmd.registerConverter(ElectricalConductance.class, new ELECTRICALCONDUCTANCE());
98          cmd.registerConverter(ElectricalCurrent.class, new ELECTRICALCURRENT());
99          cmd.registerConverter(ElectricalInductance.class, new ELECTRICALINDUCTANCE());
100         cmd.registerConverter(ElectricalPotential.class, new ELECTRICALPOTENTIAL());
101         cmd.registerConverter(ElectricalResistance.class, new ELECTRICALRESISTANCE());
102         cmd.registerConverter(Energy.class, new ENERGY());
103         cmd.registerConverter(EquivalentDose.class, new EQUIVALENTDOSE());
104         cmd.registerConverter(FlowMass.class, new FLOWMASS());
105         cmd.registerConverter(FlowVolume.class, new FLOWVOLUME());
106         cmd.registerConverter(Force.class, new FORCE());
107         cmd.registerConverter(Frequency.class, new FREQUENCY());
108         cmd.registerConverter(Illuminance.class, new ILLUMINANCE());
109         cmd.registerConverter(Length.class, new LENGTH());
110         cmd.registerConverter(LinearDensity.class, new LINEARDENSITY());
111         cmd.registerConverter(LuminousFlux.class, new LUMINOUSFLUX());
112         cmd.registerConverter(LuminousIntensity.class, new LUMINOUSINTENSITY());
113         cmd.registerConverter(MagneticFlux.class, new MAGNETICFLUX());
114         cmd.registerConverter(MagneticFluxDensity.class, new MAGNETICFLUXDENSITY());
115         cmd.registerConverter(Mass.class, new MASS());
116         cmd.registerConverter(Momentum.class, new MOMENTUM());
117         cmd.registerConverter(Position.class, new POSITION());
118         cmd.registerConverter(Power.class, new POWER());
119         cmd.registerConverter(Pressure.class, new PRESSURE());
120         cmd.registerConverter(RadioActivity.class, new RADIOACTIVITY());
121         cmd.registerConverter(SolidAngle.class, new SOLIDANGLE());
122         cmd.registerConverter(Speed.class, new SPEED());
123         cmd.registerConverter(Temperature.class, new TEMPERATURE());
124         cmd.registerConverter(Time.class, new TIME());
125         cmd.registerConverter(Torque.class, new TORQUE());
126         cmd.registerConverter(Volume.class, new VOLUME());
127     }
128 
129     /**
130      * Convert an absolute temperature String with unit on the command line to an AbsoluteTemperature scalar.
131      */
132     public static class ABSOLUTETEMPERATURE implements ITypeConverter<AbsoluteTemperature>
133     {
134         /** {@inheritDoc} */
135         @Override
136         @Generated(value = "org.djunits.generator.GenerateCliConverters", date = "2020-01-17T12:27:20.797349900Z")
137         public AbsoluteTemperature convert(final String value) throws Exception
138         {
139             return AbsoluteTemperature.valueOf(value);
140         }
141     }
142 
143     /**
144      * Convert an absorbed dose String with unit on the command line to an AbsorbedDose scalar.
145      */
146     public static class ABSORBEDDOSE implements ITypeConverter<AbsorbedDose>
147     {
148         /** {@inheritDoc} */
149         @Override
150         @Generated(value = "org.djunits.generator.GenerateCliConverters", date = "2020-01-17T12:27:20.797349900Z")
151         public AbsorbedDose convert(final String value) throws Exception
152         {
153             return AbsorbedDose.valueOf(value);
154         }
155     }
156 
157     /**
158      * Convert an acceleration String with unit on the command line to an Acceleration scalar.
159      */
160     public static class ACCELERATION implements ITypeConverter<Acceleration>
161     {
162         /** {@inheritDoc} */
163         @Override
164         @Generated(value = "org.djunits.generator.GenerateCliConverters", date = "2020-01-17T12:27:20.797349900Z")
165         public Acceleration convert(final String value) throws Exception
166         {
167             return Acceleration.valueOf(value);
168         }
169     }
170 
171     /**
172      * Convert an amount of substance String with unit on the command line to an AmountOfSubstance scalar.
173      */
174     public static class AMOUNTOFSUBSTANCE implements ITypeConverter<AmountOfSubstance>
175     {
176         /** {@inheritDoc} */
177         @Override
178         @Generated(value = "org.djunits.generator.GenerateCliConverters", date = "2020-01-17T12:27:20.797349900Z")
179         public AmountOfSubstance convert(final String value) throws Exception
180         {
181             return AmountOfSubstance.valueOf(value);
182         }
183     }
184 
185     /**
186      * Convert an angle String with unit on the command line to an Angle scalar.
187      */
188     public static class ANGLE implements ITypeConverter<Angle>
189     {
190         /** {@inheritDoc} */
191         @Override
192         @Generated(value = "org.djunits.generator.GenerateCliConverters", date = "2020-01-17T12:27:20.797349900Z")
193         public Angle convert(final String value) throws Exception
194         {
195             return Angle.valueOf(value);
196         }
197     }
198 
199     /**
200      * Convert an angular acceleration String with unit on the command line to an AngularAcceleration scalar.
201      */
202     public static class ANGULARACCELERATION implements ITypeConverter<AngularAcceleration>
203     {
204         /** {@inheritDoc} */
205         @Override
206         @Generated(value = "org.djunits.generator.GenerateCliConverters", date = "2020-01-17T12:27:20.797349900Z")
207         public AngularAcceleration convert(final String value) throws Exception
208         {
209             return AngularAcceleration.valueOf(value);
210         }
211     }
212 
213     /**
214      * Convert an angular velocity String with unit on the command line to an AngularVelocity scalar.
215      */
216     public static class ANGULARVELOCITY implements ITypeConverter<AngularVelocity>
217     {
218         /** {@inheritDoc} */
219         @Override
220         @Generated(value = "org.djunits.generator.GenerateCliConverters", date = "2020-01-17T12:27:20.797349900Z")
221         public AngularVelocity convert(final String value) throws Exception
222         {
223             return AngularVelocity.valueOf(value);
224         }
225     }
226 
227     /**
228      * Convert an area String with unit on the command line to an Area scalar.
229      */
230     public static class AREA implements ITypeConverter<Area>
231     {
232         /** {@inheritDoc} */
233         @Override
234         @Generated(value = "org.djunits.generator.GenerateCliConverters", date = "2020-01-17T12:27:20.797349900Z")
235         public Area convert(final String value) throws Exception
236         {
237             return Area.valueOf(value);
238         }
239     }
240 
241     /**
242      * Convert a catalytic activity String with unit on the command line to a CatalyticActivity scalar.
243      */
244     public static class CATALYTICACTIVITY implements ITypeConverter<CatalyticActivity>
245     {
246         /** {@inheritDoc} */
247         @Override
248         @Generated(value = "org.djunits.generator.GenerateCliConverters", date = "2020-01-17T12:27:20.797349900Z")
249         public CatalyticActivity convert(final String value) throws Exception
250         {
251             return CatalyticActivity.valueOf(value);
252         }
253     }
254 
255     /**
256      * Convert a density String with unit on the command line to a Density scalar.
257      */
258     public static class DENSITY implements ITypeConverter<Density>
259     {
260         /** {@inheritDoc} */
261         @Override
262         @Generated(value = "org.djunits.generator.GenerateCliConverters", date = "2020-01-17T12:27:20.797349900Z")
263         public Density convert(final String value) throws Exception
264         {
265             return Density.valueOf(value);
266         }
267     }
268 
269     /**
270      * Convert a dimensionless String with unit on the command line to a Dimensionless scalar.
271      */
272     public static class DIMENSIONLESS implements ITypeConverter<Dimensionless>
273     {
274         /** {@inheritDoc} */
275         @Override
276         @Generated(value = "org.djunits.generator.GenerateCliConverters", date = "2020-01-17T12:27:20.797349900Z")
277         public Dimensionless convert(final String value) throws Exception
278         {
279             return Dimensionless.valueOf(value);
280         }
281     }
282 
283     /**
284      * Convert a direction String with unit on the command line to a Direction scalar.
285      */
286     public static class DIRECTION implements ITypeConverter<Direction>
287     {
288         /** {@inheritDoc} */
289         @Override
290         @Generated(value = "org.djunits.generator.GenerateCliConverters", date = "2020-01-17T12:27:20.797349900Z")
291         public Direction convert(final String value) throws Exception
292         {
293             return Direction.valueOf(value);
294         }
295     }
296 
297     /**
298      * Convert a duration String with unit on the command line to a Duration scalar.
299      */
300     public static class DURATION implements ITypeConverter<Duration>
301     {
302         /** {@inheritDoc} */
303         @Override
304         @Generated(value = "org.djunits.generator.GenerateCliConverters", date = "2020-01-17T12:27:20.797349900Z")
305         public Duration convert(final String value) throws Exception
306         {
307             return Duration.valueOf(value);
308         }
309     }
310 
311     /**
312      * Convert an electrical capacitance String with unit on the command line to an ElectricalCapacitance scalar.
313      */
314     public static class ELECTRICALCAPACITANCE implements ITypeConverter<ElectricalCapacitance>
315     {
316         /** {@inheritDoc} */
317         @Override
318         @Generated(value = "org.djunits.generator.GenerateCliConverters", date = "2020-01-17T12:27:20.797349900Z")
319         public ElectricalCapacitance convert(final String value) throws Exception
320         {
321             return ElectricalCapacitance.valueOf(value);
322         }
323     }
324 
325     /**
326      * Convert an electrical charge String with unit on the command line to an ElectricalCharge scalar.
327      */
328     public static class ELECTRICALCHARGE implements ITypeConverter<ElectricalCharge>
329     {
330         /** {@inheritDoc} */
331         @Override
332         @Generated(value = "org.djunits.generator.GenerateCliConverters", date = "2020-01-17T12:27:20.797349900Z")
333         public ElectricalCharge convert(final String value) throws Exception
334         {
335             return ElectricalCharge.valueOf(value);
336         }
337     }
338 
339     /**
340      * Convert an electrical conductance String with unit on the command line to an ElectricalConductance scalar.
341      */
342     public static class ELECTRICALCONDUCTANCE implements ITypeConverter<ElectricalConductance>
343     {
344         /** {@inheritDoc} */
345         @Override
346         @Generated(value = "org.djunits.generator.GenerateCliConverters", date = "2020-01-17T12:27:20.797349900Z")
347         public ElectricalConductance convert(final String value) throws Exception
348         {
349             return ElectricalConductance.valueOf(value);
350         }
351     }
352 
353     /**
354      * Convert an electrical current String with unit on the command line to an ElectricalCurrent scalar.
355      */
356     public static class ELECTRICALCURRENT implements ITypeConverter<ElectricalCurrent>
357     {
358         /** {@inheritDoc} */
359         @Override
360         @Generated(value = "org.djunits.generator.GenerateCliConverters", date = "2020-01-17T12:27:20.797349900Z")
361         public ElectricalCurrent convert(final String value) throws Exception
362         {
363             return ElectricalCurrent.valueOf(value);
364         }
365     }
366 
367     /**
368      * Convert an electrical inductance String with unit on the command line to an ElectricalInductance scalar.
369      */
370     public static class ELECTRICALINDUCTANCE implements ITypeConverter<ElectricalInductance>
371     {
372         /** {@inheritDoc} */
373         @Override
374         @Generated(value = "org.djunits.generator.GenerateCliConverters", date = "2020-01-17T12:27:20.797349900Z")
375         public ElectricalInductance convert(final String value) throws Exception
376         {
377             return ElectricalInductance.valueOf(value);
378         }
379     }
380 
381     /**
382      * Convert an electrical potential String with unit on the command line to an ElectricalPotential scalar.
383      */
384     public static class ELECTRICALPOTENTIAL implements ITypeConverter<ElectricalPotential>
385     {
386         /** {@inheritDoc} */
387         @Override
388         @Generated(value = "org.djunits.generator.GenerateCliConverters", date = "2020-01-17T12:27:20.797349900Z")
389         public ElectricalPotential convert(final String value) throws Exception
390         {
391             return ElectricalPotential.valueOf(value);
392         }
393     }
394 
395     /**
396      * Convert an electrical resistance String with unit on the command line to an ElectricalResistance scalar.
397      */
398     public static class ELECTRICALRESISTANCE implements ITypeConverter<ElectricalResistance>
399     {
400         /** {@inheritDoc} */
401         @Override
402         @Generated(value = "org.djunits.generator.GenerateCliConverters", date = "2020-01-17T12:27:20.797349900Z")
403         public ElectricalResistance convert(final String value) throws Exception
404         {
405             return ElectricalResistance.valueOf(value);
406         }
407     }
408 
409     /**
410      * Convert an energy String with unit on the command line to an Energy scalar.
411      */
412     public static class ENERGY implements ITypeConverter<Energy>
413     {
414         /** {@inheritDoc} */
415         @Override
416         @Generated(value = "org.djunits.generator.GenerateCliConverters", date = "2020-01-17T12:27:20.797349900Z")
417         public Energy convert(final String value) throws Exception
418         {
419             return Energy.valueOf(value);
420         }
421     }
422 
423     /**
424      * Convert an equivalent dose String with unit on the command line to an EquivalentDose scalar.
425      */
426     public static class EQUIVALENTDOSE implements ITypeConverter<EquivalentDose>
427     {
428         /** {@inheritDoc} */
429         @Override
430         @Generated(value = "org.djunits.generator.GenerateCliConverters", date = "2020-01-17T12:27:20.797349900Z")
431         public EquivalentDose convert(final String value) throws Exception
432         {
433             return EquivalentDose.valueOf(value);
434         }
435     }
436 
437     /**
438      * Convert a flow mass String with unit on the command line to a FlowMass scalar.
439      */
440     public static class FLOWMASS implements ITypeConverter<FlowMass>
441     {
442         /** {@inheritDoc} */
443         @Override
444         @Generated(value = "org.djunits.generator.GenerateCliConverters", date = "2020-01-17T12:27:20.797349900Z")
445         public FlowMass convert(final String value) throws Exception
446         {
447             return FlowMass.valueOf(value);
448         }
449     }
450 
451     /**
452      * Convert a flow volume String with unit on the command line to a FlowVolume scalar.
453      */
454     public static class FLOWVOLUME implements ITypeConverter<FlowVolume>
455     {
456         /** {@inheritDoc} */
457         @Override
458         @Generated(value = "org.djunits.generator.GenerateCliConverters", date = "2020-01-17T12:27:20.797349900Z")
459         public FlowVolume convert(final String value) throws Exception
460         {
461             return FlowVolume.valueOf(value);
462         }
463     }
464 
465     /**
466      * Convert a force String with unit on the command line to a Force scalar.
467      */
468     public static class FORCE implements ITypeConverter<Force>
469     {
470         /** {@inheritDoc} */
471         @Override
472         @Generated(value = "org.djunits.generator.GenerateCliConverters", date = "2020-01-17T12:27:20.797349900Z")
473         public Force convert(final String value) throws Exception
474         {
475             return Force.valueOf(value);
476         }
477     }
478 
479     /**
480      * Convert a frequency String with unit on the command line to a Frequency scalar.
481      */
482     public static class FREQUENCY implements ITypeConverter<Frequency>
483     {
484         /** {@inheritDoc} */
485         @Override
486         @Generated(value = "org.djunits.generator.GenerateCliConverters", date = "2020-01-17T12:27:20.797349900Z")
487         public Frequency convert(final String value) throws Exception
488         {
489             return Frequency.valueOf(value);
490         }
491     }
492 
493     /**
494      * Convert an illuminance String with unit on the command line to an Illuminance scalar.
495      */
496     public static class ILLUMINANCE implements ITypeConverter<Illuminance>
497     {
498         /** {@inheritDoc} */
499         @Override
500         @Generated(value = "org.djunits.generator.GenerateCliConverters", date = "2020-01-17T12:27:20.797349900Z")
501         public Illuminance convert(final String value) throws Exception
502         {
503             return Illuminance.valueOf(value);
504         }
505     }
506 
507     /**
508      * Convert a length String with unit on the command line to a Length scalar.
509      */
510     public static class LENGTH implements ITypeConverter<Length>
511     {
512         /** {@inheritDoc} */
513         @Override
514         @Generated(value = "org.djunits.generator.GenerateCliConverters", date = "2020-01-17T12:27:20.797349900Z")
515         public Length convert(final String value) throws Exception
516         {
517             return Length.valueOf(value);
518         }
519     }
520 
521     /**
522      * Convert a linear density String with unit on the command line to a LinearDensity scalar.
523      */
524     public static class LINEARDENSITY implements ITypeConverter<LinearDensity>
525     {
526         /** {@inheritDoc} */
527         @Override
528         @Generated(value = "org.djunits.generator.GenerateCliConverters", date = "2020-01-17T12:27:20.797349900Z")
529         public LinearDensity convert(final String value) throws Exception
530         {
531             return LinearDensity.valueOf(value);
532         }
533     }
534 
535     /**
536      * Convert a luminous flux String with unit on the command line to a LuminousFlux scalar.
537      */
538     public static class LUMINOUSFLUX implements ITypeConverter<LuminousFlux>
539     {
540         /** {@inheritDoc} */
541         @Override
542         @Generated(value = "org.djunits.generator.GenerateCliConverters", date = "2020-01-17T12:27:20.797349900Z")
543         public LuminousFlux convert(final String value) throws Exception
544         {
545             return LuminousFlux.valueOf(value);
546         }
547     }
548 
549     /**
550      * Convert a luminous intensity String with unit on the command line to a LuminousIntensity scalar.
551      */
552     public static class LUMINOUSINTENSITY implements ITypeConverter<LuminousIntensity>
553     {
554         /** {@inheritDoc} */
555         @Override
556         @Generated(value = "org.djunits.generator.GenerateCliConverters", date = "2020-01-17T12:27:20.797349900Z")
557         public LuminousIntensity convert(final String value) throws Exception
558         {
559             return LuminousIntensity.valueOf(value);
560         }
561     }
562 
563     /**
564      * Convert a magnetic flux String with unit on the command line to a MagneticFlux scalar.
565      */
566     public static class MAGNETICFLUX implements ITypeConverter<MagneticFlux>
567     {
568         /** {@inheritDoc} */
569         @Override
570         @Generated(value = "org.djunits.generator.GenerateCliConverters", date = "2020-01-17T12:27:20.797349900Z")
571         public MagneticFlux convert(final String value) throws Exception
572         {
573             return MagneticFlux.valueOf(value);
574         }
575     }
576 
577     /**
578      * Convert a magnetic flux density String with unit on the command line to a MagneticFluxDensity scalar.
579      */
580     public static class MAGNETICFLUXDENSITY implements ITypeConverter<MagneticFluxDensity>
581     {
582         /** {@inheritDoc} */
583         @Override
584         @Generated(value = "org.djunits.generator.GenerateCliConverters", date = "2020-01-17T12:27:20.797349900Z")
585         public MagneticFluxDensity convert(final String value) throws Exception
586         {
587             return MagneticFluxDensity.valueOf(value);
588         }
589     }
590 
591     /**
592      * Convert a mass String with unit on the command line to a Mass scalar.
593      */
594     public static class MASS implements ITypeConverter<Mass>
595     {
596         /** {@inheritDoc} */
597         @Override
598         @Generated(value = "org.djunits.generator.GenerateCliConverters", date = "2020-01-17T12:27:20.797349900Z")
599         public Mass convert(final String value) throws Exception
600         {
601             return Mass.valueOf(value);
602         }
603     }
604 
605     /**
606      * Convert a momentum String with unit on the command line to a Momentum scalar.
607      */
608     public static class MOMENTUM implements ITypeConverter<Momentum>
609     {
610         /** {@inheritDoc} */
611         @Override
612         @Generated(value = "org.djunits.generator.GenerateCliConverters", date = "2020-01-17T12:27:20.797349900Z")
613         public Momentum convert(final String value) throws Exception
614         {
615             return Momentum.valueOf(value);
616         }
617     }
618 
619     /**
620      * Convert a position String with unit on the command line to a Position scalar.
621      */
622     public static class POSITION implements ITypeConverter<Position>
623     {
624         /** {@inheritDoc} */
625         @Override
626         @Generated(value = "org.djunits.generator.GenerateCliConverters", date = "2020-01-17T12:27:20.797349900Z")
627         public Position convert(final String value) throws Exception
628         {
629             return Position.valueOf(value);
630         }
631     }
632 
633     /**
634      * Convert a power String with unit on the command line to a Power scalar.
635      */
636     public static class POWER implements ITypeConverter<Power>
637     {
638         /** {@inheritDoc} */
639         @Override
640         @Generated(value = "org.djunits.generator.GenerateCliConverters", date = "2020-01-17T12:27:20.797349900Z")
641         public Power convert(final String value) throws Exception
642         {
643             return Power.valueOf(value);
644         }
645     }
646 
647     /**
648      * Convert a pressure String with unit on the command line to a Pressure scalar.
649      */
650     public static class PRESSURE implements ITypeConverter<Pressure>
651     {
652         /** {@inheritDoc} */
653         @Override
654         @Generated(value = "org.djunits.generator.GenerateCliConverters", date = "2020-01-17T12:27:20.797349900Z")
655         public Pressure convert(final String value) throws Exception
656         {
657             return Pressure.valueOf(value);
658         }
659     }
660 
661     /**
662      * Convert a radio activity String with unit on the command line to a RadioActivity scalar.
663      */
664     public static class RADIOACTIVITY implements ITypeConverter<RadioActivity>
665     {
666         /** {@inheritDoc} */
667         @Override
668         @Generated(value = "org.djunits.generator.GenerateCliConverters", date = "2020-01-17T12:27:20.797349900Z")
669         public RadioActivity convert(final String value) throws Exception
670         {
671             return RadioActivity.valueOf(value);
672         }
673     }
674 
675     /**
676      * Convert a solid angle String with unit on the command line to a SolidAngle scalar.
677      */
678     public static class SOLIDANGLE implements ITypeConverter<SolidAngle>
679     {
680         /** {@inheritDoc} */
681         @Override
682         @Generated(value = "org.djunits.generator.GenerateCliConverters", date = "2020-01-17T12:27:20.797349900Z")
683         public SolidAngle convert(final String value) throws Exception
684         {
685             return SolidAngle.valueOf(value);
686         }
687     }
688 
689     /**
690      * Convert a speed String with unit on the command line to a Speed scalar.
691      */
692     public static class SPEED implements ITypeConverter<Speed>
693     {
694         /** {@inheritDoc} */
695         @Override
696         @Generated(value = "org.djunits.generator.GenerateCliConverters", date = "2020-01-17T12:27:20.797349900Z")
697         public Speed convert(final String value) throws Exception
698         {
699             return Speed.valueOf(value);
700         }
701     }
702 
703     /**
704      * Convert a temperature String with unit on the command line to a Temperature scalar.
705      */
706     public static class TEMPERATURE implements ITypeConverter<Temperature>
707     {
708         /** {@inheritDoc} */
709         @Override
710         @Generated(value = "org.djunits.generator.GenerateCliConverters", date = "2020-01-17T12:27:20.797349900Z")
711         public Temperature convert(final String value) throws Exception
712         {
713             return Temperature.valueOf(value);
714         }
715     }
716 
717     /**
718      * Convert a time String with unit on the command line to a Time scalar.
719      */
720     public static class TIME implements ITypeConverter<Time>
721     {
722         /** {@inheritDoc} */
723         @Override
724         @Generated(value = "org.djunits.generator.GenerateCliConverters", date = "2020-01-17T12:27:20.797349900Z")
725         public Time convert(final String value) throws Exception
726         {
727             return Time.valueOf(value);
728         }
729     }
730 
731     /**
732      * Convert a torque String with unit on the command line to a Torque scalar.
733      */
734     public static class TORQUE implements ITypeConverter<Torque>
735     {
736         /** {@inheritDoc} */
737         @Override
738         @Generated(value = "org.djunits.generator.GenerateCliConverters", date = "2020-01-17T12:27:20.797349900Z")
739         public Torque convert(final String value) throws Exception
740         {
741             return Torque.valueOf(value);
742         }
743     }
744 
745     /**
746      * Convert a volume String with unit on the command line to a Volume scalar.
747      */
748     public static class VOLUME implements ITypeConverter<Volume>
749     {
750         /** {@inheritDoc} */
751         @Override
752         @Generated(value = "org.djunits.generator.GenerateCliConverters", date = "2020-01-17T12:27:20.797349900Z")
753         public Volume convert(final String value) throws Exception
754         {
755             return Volume.valueOf(value);
756         }
757     }
758 
759 }