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