View Javadoc
1   package org.djunits.value.vdouble.scalar;
2   
3   import java.util.Locale;
4   
5   import org.djunits.unit.AbsorbedDoseUnit;
6   import org.djunits.unit.AccelerationUnit;
7   import org.djunits.unit.AmountOfSubstanceUnit;
8   import org.djunits.unit.AngleUnit;
9   import org.djunits.unit.AreaUnit;
10  import org.djunits.unit.CatalyticActivityUnit;
11  import org.djunits.unit.DensityUnit;
12  import org.djunits.unit.DimensionlessUnit;
13  import org.djunits.unit.DurationUnit;
14  import org.djunits.unit.ElectricalCapacitanceUnit;
15  import org.djunits.unit.ElectricalChargeUnit;
16  import org.djunits.unit.ElectricalConductanceUnit;
17  import org.djunits.unit.ElectricalCurrentUnit;
18  import org.djunits.unit.ElectricalInductanceUnit;
19  import org.djunits.unit.ElectricalPotentialUnit;
20  import org.djunits.unit.ElectricalResistanceUnit;
21  import org.djunits.unit.EnergyUnit;
22  import org.djunits.unit.EquivalentDoseUnit;
23  import org.djunits.unit.FlowMassUnit;
24  import org.djunits.unit.FlowVolumeUnit;
25  import org.djunits.unit.ForceUnit;
26  import org.djunits.unit.FrequencyUnit;
27  import org.djunits.unit.IlluminanceUnit;
28  import org.djunits.unit.LengthUnit;
29  import org.djunits.unit.LinearDensityUnit;
30  import org.djunits.unit.LuminousFluxUnit;
31  import org.djunits.unit.LuminousIntensityUnit;
32  import org.djunits.unit.MagneticFluxDensityUnit;
33  import org.djunits.unit.MagneticFluxUnit;
34  import org.djunits.unit.MassUnit;
35  import org.djunits.unit.PowerUnit;
36  import org.djunits.unit.PressureUnit;
37  import org.djunits.unit.RadioActivityUnit;
38  import org.djunits.unit.SolidAngleUnit;
39  import org.djunits.unit.SpeedUnit;
40  import org.djunits.unit.TemperatureUnit;
41  import org.djunits.unit.TorqueUnit;
42  import org.djunits.unit.VolumeUnit;
43  import org.djunits.value.function.DimensionlessFunctions;
44  import org.djunits.value.vdouble.scalar.base.DoubleScalarRel;
45  import org.djutils.base.NumberParser;
46  import org.djutils.exceptions.Throw;
47  
48  import jakarta.annotation.Generated;
49  
50  /**
51   * Easy access methods for the Dimensionless DoubleScalar, which is relative by definition.
52   * <p>
53   * Copyright (c) 2013-2024 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved. <br>
54   * BSD-style license. See <a href="https://djunits.org/docs/license.html">DJUNITS License</a>.
55   * </p>
56   * @author <a href="https://www.tudelft.nl/averbraeck">Alexander Verbraeck</a>
57   * @author <a href="https://www.tudelft.nl/staff/p.knoppers/">Peter Knoppers</a>
58   */
59  @Generated(value = "org.djunits.generator.GenerateDJUNIT", date = "2023-07-23T14:06:38.224104100Z")
60  public class Dimensionless extends DoubleScalarRel<DimensionlessUnit, Dimensionless>
61          implements DimensionlessFunctions<DimensionlessUnit, Dimensionless>
62  {
63      /** */
64      private static final long serialVersionUID = 20150905L;
65  
66      /** Constant with value zero. */
67      public static final Dimensionless ZERO = new Dimensionless(0.0, DimensionlessUnit.SI);
68  
69      /** Constant with value one. */
70      public static final Dimensionless ONE = new Dimensionless(1.0, DimensionlessUnit.SI);
71  
72      /** Constant with value NaN. */
73      @SuppressWarnings("checkstyle:constantname")
74      public static final Dimensionless NaN = new Dimensionless(Double.NaN, DimensionlessUnit.SI);
75  
76      /** Constant with value POSITIVE_INFINITY. */
77      public static final Dimensionless POSITIVE_INFINITY = new Dimensionless(Double.POSITIVE_INFINITY, DimensionlessUnit.SI);
78  
79      /** Constant with value NEGATIVE_INFINITY. */
80      public static final Dimensionless NEGATIVE_INFINITY = new Dimensionless(Double.NEGATIVE_INFINITY, DimensionlessUnit.SI);
81  
82      /** Constant with value MAX_VALUE. */
83      public static final Dimensionless POS_MAXVALUE = new Dimensionless(Double.MAX_VALUE, DimensionlessUnit.SI);
84  
85      /** Constant with value -MAX_VALUE. */
86      public static final Dimensionless NEG_MAXVALUE = new Dimensionless(-Double.MAX_VALUE, DimensionlessUnit.SI);
87  
88      /**
89       * Construct Dimensionless scalar.
90       * @param value double; the double value
91       * @param unit DimensionlessUnit; unit for the double value
92       */
93      public Dimensionless(final double value, final DimensionlessUnit unit)
94      {
95          super(value, unit);
96      }
97  
98      /**
99       * Construct Dimensionless scalar.
100      * @param value Dimensionless; Scalar from which to construct this instance
101      */
102     public Dimensionless(final Dimensionless value)
103     {
104         super(value);
105     }
106 
107     @Override
108     public final Dimensionless instantiateRel(final double value, final DimensionlessUnit unit)
109     {
110         return new Dimensionless(value, unit);
111     }
112 
113     /**
114      * Construct Dimensionless scalar.
115      * @param value double; the double value in SI units
116      * @return Dimensionless; the new scalar with the SI value
117      */
118     public static final Dimensionless instantiateSI(final double value)
119     {
120         return new Dimensionless(value, DimensionlessUnit.SI);
121     }
122 
123     /**
124      * Interpolate between two values.
125      * @param zero Dimensionless; the low value
126      * @param one Dimensionless; the high value
127      * @param ratio double; the ratio between 0 and 1, inclusive
128      * @return Dimensionless; a Scalar at the ratio between
129      */
130     public static Dimensionless interpolate(final Dimensionless zero, final Dimensionless one, final double ratio)
131     {
132         return new Dimensionless(zero.getInUnit() * (1 - ratio) + one.getInUnit(zero.getDisplayUnit()) * ratio,
133                 zero.getDisplayUnit());
134     }
135 
136     /**
137      * Return the maximum value of two relative scalars.
138      * @param r1 Dimensionless; the first scalar
139      * @param r2 Dimensionless; the second scalar
140      * @return Dimensionless; the maximum value of two relative scalars
141      */
142     public static Dimensionless max(final Dimensionless r1, final Dimensionless r2)
143     {
144         return r1.gt(r2) ? r1 : r2;
145     }
146 
147     /**
148      * Return the maximum value of more than two relative scalars.
149      * @param r1 Dimensionless; the first scalar
150      * @param r2 Dimensionless; the second scalar
151      * @param rn Dimensionless...; the other scalars
152      * @return Dimensionless; the maximum value of more than two relative scalars
153      */
154     public static Dimensionless max(final Dimensionless r1, final Dimensionless r2, final Dimensionless... rn)
155     {
156         Dimensionless maxr = r1.gt(r2) ? r1 : r2;
157         for (Dimensionless r : rn)
158         {
159             if (r.gt(maxr))
160             {
161                 maxr = r;
162             }
163         }
164         return maxr;
165     }
166 
167     /**
168      * Return the minimum value of two relative scalars.
169      * @param r1 Dimensionless; the first scalar
170      * @param r2 Dimensionless; the second scalar
171      * @return Dimensionless; the minimum value of two relative scalars
172      */
173     public static Dimensionless min(final Dimensionless r1, final Dimensionless r2)
174     {
175         return r1.lt(r2) ? r1 : r2;
176     }
177 
178     /**
179      * Return the minimum value of more than two relative scalars.
180      * @param r1 Dimensionless; the first scalar
181      * @param r2 Dimensionless; the second scalar
182      * @param rn Dimensionless...; the other scalars
183      * @return Dimensionless; the minimum value of more than two relative scalars
184      */
185     public static Dimensionless min(final Dimensionless r1, final Dimensionless r2, final Dimensionless... rn)
186     {
187         Dimensionless minr = r1.lt(r2) ? r1 : r2;
188         for (Dimensionless r : rn)
189         {
190             if (r.lt(minr))
191             {
192                 minr = r;
193             }
194         }
195         return minr;
196     }
197 
198     /**
199      * Returns a Dimensionless representation of a textual representation of a value with a unit. The String representation that
200      * can be parsed is the double value in the unit, followed by a localized or English abbreviation of the unit. Spaces are
201      * allowed, but not required, between the value and the unit.
202      * @param text String; the textual representation to parse into a Dimensionless
203      * @return Dimensionless; the Scalar representation of the value in its unit
204      * @throws IllegalArgumentException when the text cannot be parsed
205      * @throws NullPointerException when the text argument is null
206      */
207     public static Dimensionless valueOf(final String text)
208     {
209         Throw.whenNull(text, "Error parsing Dimensionless: text to parse is null");
210         Throw.when(text.length() == 0, IllegalArgumentException.class, "Error parsing Dimensionless: empty text to parse");
211         try
212         {
213             NumberParser numberParser = new NumberParser().lenient().trailing();
214             double d = numberParser.parseDouble(text);
215             String unitString = text.substring(numberParser.getTrailingPosition()).trim();
216             if (unitString.length() != 0)
217                 throw new IllegalArgumentException("Unit " + unitString + " not found for Dimensionless");
218             return new Dimensionless(d, DimensionlessUnit.SI);
219         }
220         catch (Exception exception)
221         {
222             throw new IllegalArgumentException(
223                     "Error parsing Dimensionless from " + text + " using Locale " + Locale.getDefault(Locale.Category.FORMAT),
224                     exception);
225         }
226     }
227 
228     /**
229      * Returns a Dimensionless based on a value and the textual representation of the unit, which can be localized.
230      * @param value double; the value to use
231      * @param unitString String; the textual representation of the unit
232      * @return Dimensionless; the Scalar representation of the value in its unit
233      * @throws IllegalArgumentException when the unit cannot be parsed or is incorrect
234      * @throws NullPointerException when the unitString argument is null
235      */
236     public static Dimensionless of(final double value, final String unitString)
237     {
238         Throw.whenNull(unitString, "Error parsing Dimensionless: unitString is null");
239         Throw.when(unitString.trim().length() != 0, IllegalArgumentException.class,
240                 "Error parsing Dimensionless: non-empty unitString");
241         DimensionlessUnit unit = DimensionlessUnit.SI;
242         return new Dimensionless(value, unit);
243     }
244 
245     @Override
246     public String toStringSIPrefixed(final int smallestPower, final int biggestPower)
247     {
248         return toString();
249     }
250 
251     @Override
252     public final Dimensionless acos()
253     {
254         return instantiateRel(Math.acos(getInUnit()), getDisplayUnit());
255     }
256 
257     @Override
258     public final Dimensionless asin()
259     {
260         return instantiateRel(Math.asin(getInUnit()), getDisplayUnit());
261     }
262 
263     @Override
264     public final Dimensionless atan()
265     {
266         return instantiateRel(Math.atan(getInUnit()), getDisplayUnit());
267     }
268 
269     @Override
270     public final Dimensionless cbrt()
271     {
272         return instantiateRel(Math.cbrt(getInUnit()), getDisplayUnit());
273     }
274 
275     @Override
276     public final Dimensionless cos()
277     {
278         return instantiateRel(Math.cos(getInUnit()), getDisplayUnit());
279     }
280 
281     @Override
282     public final Dimensionless cosh()
283     {
284         return instantiateRel(Math.cosh(getInUnit()), getDisplayUnit());
285     }
286 
287     @Override
288     public final Dimensionless exp()
289     {
290         return instantiateRel(Math.exp(getInUnit()), getDisplayUnit());
291     }
292 
293     @Override
294     public final Dimensionless expm1()
295     {
296         return instantiateRel(Math.expm1(getInUnit()), getDisplayUnit());
297     }
298 
299     @Override
300     public final Dimensionless log()
301     {
302         return instantiateRel(Math.log(getInUnit()), getDisplayUnit());
303     }
304 
305     @Override
306     public final Dimensionless log10()
307     {
308         return instantiateRel(Math.log10(getInUnit()), getDisplayUnit());
309     }
310 
311     @Override
312     public final Dimensionless log1p()
313     {
314         return instantiateRel(Math.log1p(getInUnit()), getDisplayUnit());
315     }
316 
317     @Override
318     public final Dimensionless pow(final double x)
319     {
320         return instantiateRel(Math.pow(getInUnit(), x), getDisplayUnit());
321     }
322 
323     @Override
324     public final Dimensionless signum()
325     {
326         return instantiateRel(Math.signum(getInUnit()), getDisplayUnit());
327     }
328 
329     @Override
330     public final Dimensionless sin()
331     {
332         return instantiateRel(Math.sin(getInUnit()), getDisplayUnit());
333     }
334 
335     @Override
336     public final Dimensionless sinh()
337     {
338         return instantiateRel(Math.sinh(getInUnit()), getDisplayUnit());
339     }
340 
341     @Override
342     public final Dimensionless sqrt()
343     {
344         return instantiateRel(Math.sqrt(getInUnit()), getDisplayUnit());
345     }
346 
347     @Override
348     public final Dimensionless tan()
349     {
350         return instantiateRel(Math.tan(getInUnit()), getDisplayUnit());
351     }
352 
353     @Override
354     public final Dimensionless tanh()
355     {
356         return instantiateRel(Math.tanh(getInUnit()), getDisplayUnit());
357     }
358 
359     @Override
360     public final Dimensionless inv()
361     {
362         return instantiateRel(1.0 / getInUnit(), getDisplayUnit());
363     }
364 
365     /**
366      * Calculate the division of Dimensionless and Dimensionless, which results in a Dimensionless scalar.
367      * @param v Dimensionless; scalar
368      * @return Dimensionless; scalar as a division of Dimensionless and Dimensionless
369      */
370     public final Dimensionless divide(final Dimensionless v)
371     {
372         return new Dimensionless(this.si / v.si, DimensionlessUnit.SI);
373     }
374 
375     /**
376      * Calculate the multiplication of Dimensionless and AbsorbedDose, which results in a AbsorbedDose scalar.
377      * @param v Dimensionless; scalar
378      * @return AbsorbedDose; scalar as a multiplication of Dimensionless and AbsorbedDose
379      */
380     public final AbsorbedDose times(final AbsorbedDose v)
381     {
382         return new AbsorbedDose(this.si * v.si, AbsorbedDoseUnit.SI);
383     }
384 
385     /**
386      * Calculate the multiplication of Dimensionless and Acceleration, which results in a Acceleration scalar.
387      * @param v Dimensionless; scalar
388      * @return Acceleration; scalar as a multiplication of Dimensionless and Acceleration
389      */
390     public final Acceleration times(final Acceleration v)
391     {
392         return new Acceleration(this.si * v.si, AccelerationUnit.SI);
393     }
394 
395     /**
396      * Calculate the multiplication of Dimensionless and AmountOfSubstance, which results in a AmountOfSubstance scalar.
397      * @param v Dimensionless; scalar
398      * @return AmountOfSubstance; scalar as a multiplication of Dimensionless and AmountOfSubstance
399      */
400     public final AmountOfSubstance times(final AmountOfSubstance v)
401     {
402         return new AmountOfSubstance(this.si * v.si, AmountOfSubstanceUnit.SI);
403     }
404 
405     /**
406      * Calculate the multiplication of Dimensionless and Angle, which results in a Angle scalar.
407      * @param v Dimensionless; scalar
408      * @return Angle; scalar as a multiplication of Dimensionless and Angle
409      */
410     public final Angle times(final Angle v)
411     {
412         return new Angle(this.si * v.si, AngleUnit.SI);
413     }
414 
415     /**
416      * Calculate the multiplication of Dimensionless and SolidAngle, which results in a SolidAngle scalar.
417      * @param v Dimensionless; scalar
418      * @return SolidAngle; scalar as a multiplication of Dimensionless and SolidAngle
419      */
420     public final SolidAngle times(final SolidAngle v)
421     {
422         return new SolidAngle(this.si * v.si, SolidAngleUnit.SI);
423     }
424 
425     /**
426      * Calculate the multiplication of Dimensionless and Area, which results in a Area scalar.
427      * @param v Dimensionless; scalar
428      * @return Area; scalar as a multiplication of Dimensionless and Area
429      */
430     public final Area times(final Area v)
431     {
432         return new Area(this.si * v.si, AreaUnit.SI);
433     }
434 
435     /**
436      * Calculate the multiplication of Dimensionless and CatalyticActivity, which results in a CatalyticActivity scalar.
437      * @param v Dimensionless; scalar
438      * @return CatalyticActivity; scalar as a multiplication of Dimensionless and CatalyticActivity
439      */
440     public final CatalyticActivity times(final CatalyticActivity v)
441     {
442         return new CatalyticActivity(this.si * v.si, CatalyticActivityUnit.SI);
443     }
444 
445     /**
446      * Calculate the multiplication of Dimensionless and Density, which results in a Density scalar.
447      * @param v Dimensionless; scalar
448      * @return Density; scalar as a multiplication of Dimensionless and Density
449      */
450     public final Density times(final Density v)
451     {
452         return new Density(this.si * v.si, DensityUnit.SI);
453     }
454 
455     /**
456      * Calculate the multiplication of Dimensionless and Dimensionless, which results in a Dimensionless scalar.
457      * @param v Dimensionless; scalar
458      * @return Dimensionless; scalar as a multiplication of Dimensionless and Dimensionless
459      */
460     public final Dimensionless times(final Dimensionless v)
461     {
462         return new Dimensionless(this.si * v.si, DimensionlessUnit.SI);
463     }
464 
465     /**
466      * Calculate the multiplication of Dimensionless and ElectricalCapacitance, which results in a ElectricalCapacitance scalar.
467      * @param v Dimensionless; scalar
468      * @return ElectricalCapacitance; scalar as a multiplication of Dimensionless and ElectricalCapacitance
469      */
470     public final ElectricalCapacitance times(final ElectricalCapacitance v)
471     {
472         return new ElectricalCapacitance(this.si * v.si, ElectricalCapacitanceUnit.SI);
473     }
474 
475     /**
476      * Calculate the multiplication of Dimensionless and ElectricalCharge, which results in a ElectricalCharge scalar.
477      * @param v Dimensionless; scalar
478      * @return ElectricalCharge; scalar as a multiplication of Dimensionless and ElectricalCharge
479      */
480     public final ElectricalCharge times(final ElectricalCharge v)
481     {
482         return new ElectricalCharge(this.si * v.si, ElectricalChargeUnit.SI);
483     }
484 
485     /**
486      * Calculate the multiplication of Dimensionless and ElectricalConductance, which results in a ElectricalConductance scalar.
487      * @param v Dimensionless; scalar
488      * @return ElectricalConductance; scalar as a multiplication of Dimensionless and ElectricalConductance
489      */
490     public final ElectricalConductance times(final ElectricalConductance v)
491     {
492         return new ElectricalConductance(this.si * v.si, ElectricalConductanceUnit.SI);
493     }
494 
495     /**
496      * Calculate the multiplication of Dimensionless and ElectricalCurrent, which results in a ElectricalCurrent scalar.
497      * @param v Dimensionless; scalar
498      * @return ElectricalCurrent; scalar as a multiplication of Dimensionless and ElectricalCurrent
499      */
500     public final ElectricalCurrent times(final ElectricalCurrent v)
501     {
502         return new ElectricalCurrent(this.si * v.si, ElectricalCurrentUnit.SI);
503     }
504 
505     /**
506      * Calculate the multiplication of Dimensionless and ElectricalInductance, which results in a ElectricalInductance scalar.
507      * @param v Dimensionless; scalar
508      * @return ElectricalInductance; scalar as a multiplication of Dimensionless and ElectricalInductance
509      */
510     public final ElectricalInductance times(final ElectricalInductance v)
511     {
512         return new ElectricalInductance(this.si * v.si, ElectricalInductanceUnit.SI);
513     }
514 
515     /**
516      * Calculate the multiplication of Dimensionless and ElectricalPotential, which results in a ElectricalPotential scalar.
517      * @param v Dimensionless; scalar
518      * @return ElectricalPotential; scalar as a multiplication of Dimensionless and ElectricalPotential
519      */
520     public final ElectricalPotential times(final ElectricalPotential v)
521     {
522         return new ElectricalPotential(this.si * v.si, ElectricalPotentialUnit.SI);
523     }
524 
525     /**
526      * Calculate the multiplication of Dimensionless and ElectricalResistance, which results in a ElectricalResistance scalar.
527      * @param v Dimensionless; scalar
528      * @return ElectricalResistance; scalar as a multiplication of Dimensionless and ElectricalResistance
529      */
530     public final ElectricalResistance times(final ElectricalResistance v)
531     {
532         return new ElectricalResistance(this.si * v.si, ElectricalResistanceUnit.SI);
533     }
534 
535     /**
536      * Calculate the multiplication of Dimensionless and Energy, which results in a Energy scalar.
537      * @param v Dimensionless; scalar
538      * @return Energy; scalar as a multiplication of Dimensionless and Energy
539      */
540     public final Energy times(final Energy v)
541     {
542         return new Energy(this.si * v.si, EnergyUnit.SI);
543     }
544 
545     /**
546      * Calculate the multiplication of Dimensionless and EquivalentDose, which results in a EquivalentDose scalar.
547      * @param v Dimensionless; scalar
548      * @return EquivalentDose; scalar as a multiplication of Dimensionless and EquivalentDose
549      */
550     public final EquivalentDose times(final EquivalentDose v)
551     {
552         return new EquivalentDose(this.si * v.si, EquivalentDoseUnit.SI);
553     }
554 
555     /**
556      * Calculate the multiplication of Dimensionless and FlowMass, which results in a FlowMass scalar.
557      * @param v Dimensionless; scalar
558      * @return FlowMass; scalar as a multiplication of Dimensionless and FlowMass
559      */
560     public final FlowMass times(final FlowMass v)
561     {
562         return new FlowMass(this.si * v.si, FlowMassUnit.SI);
563     }
564 
565     /**
566      * Calculate the multiplication of Dimensionless and FlowVolume, which results in a FlowVolume scalar.
567      * @param v Dimensionless; scalar
568      * @return FlowVolume; scalar as a multiplication of Dimensionless and FlowVolume
569      */
570     public final FlowVolume times(final FlowVolume v)
571     {
572         return new FlowVolume(this.si * v.si, FlowVolumeUnit.SI);
573     }
574 
575     /**
576      * Calculate the multiplication of Dimensionless and Force, which results in a Force scalar.
577      * @param v Dimensionless; scalar
578      * @return Force; scalar as a multiplication of Dimensionless and Force
579      */
580     public final Force times(final Force v)
581     {
582         return new Force(this.si * v.si, ForceUnit.SI);
583     }
584 
585     /**
586      * Calculate the multiplication of Dimensionless and Frequency, which results in a Frequency scalar.
587      * @param v Dimensionless; scalar
588      * @return Frequency; scalar as a multiplication of Dimensionless and Frequency
589      */
590     public final Frequency times(final Frequency v)
591     {
592         return new Frequency(this.si * v.si, FrequencyUnit.SI);
593     }
594 
595     /**
596      * Calculate the multiplication of Dimensionless and Illuminance, which results in a Illuminance scalar.
597      * @param v Dimensionless; scalar
598      * @return Illuminance; scalar as a multiplication of Dimensionless and Illuminance
599      */
600     public final Illuminance times(final Illuminance v)
601     {
602         return new Illuminance(this.si * v.si, IlluminanceUnit.SI);
603     }
604 
605     /**
606      * Calculate the multiplication of Dimensionless and Length, which results in a Length scalar.
607      * @param v Dimensionless; scalar
608      * @return Length; scalar as a multiplication of Dimensionless and Length
609      */
610     public final Length times(final Length v)
611     {
612         return new Length(this.si * v.si, LengthUnit.SI);
613     }
614 
615     /**
616      * Calculate the multiplication of Dimensionless and LinearDensity, which results in a LinearDensity scalar.
617      * @param v Dimensionless; scalar
618      * @return LinearDensity; scalar as a multiplication of Dimensionless and LinearDensity
619      */
620     public final LinearDensity times(final LinearDensity v)
621     {
622         return new LinearDensity(this.si * v.si, LinearDensityUnit.SI);
623     }
624 
625     /**
626      * Calculate the multiplication of Dimensionless and LuminousFlux, which results in a LuminousFlux scalar.
627      * @param v Dimensionless; scalar
628      * @return LuminousFlux; scalar as a multiplication of Dimensionless and LuminousFlux
629      */
630     public final LuminousFlux times(final LuminousFlux v)
631     {
632         return new LuminousFlux(this.si * v.si, LuminousFluxUnit.SI);
633     }
634 
635     /**
636      * Calculate the multiplication of Dimensionless and LuminousIntensity, which results in a LuminousIntensity scalar.
637      * @param v Dimensionless; scalar
638      * @return LuminousIntensity; scalar as a multiplication of Dimensionless and LuminousIntensity
639      */
640     public final LuminousIntensity times(final LuminousIntensity v)
641     {
642         return new LuminousIntensity(this.si * v.si, LuminousIntensityUnit.SI);
643     }
644 
645     /**
646      * Calculate the multiplication of Dimensionless and MagneticFluxDensity, which results in a MagneticFluxDensity scalar.
647      * @param v Dimensionless; scalar
648      * @return MagneticFluxDensity; scalar as a multiplication of Dimensionless and MagneticFluxDensity
649      */
650     public final MagneticFluxDensity times(final MagneticFluxDensity v)
651     {
652         return new MagneticFluxDensity(this.si * v.si, MagneticFluxDensityUnit.SI);
653     }
654 
655     /**
656      * Calculate the multiplication of Dimensionless and MagneticFlux, which results in a MagneticFlux scalar.
657      * @param v Dimensionless; scalar
658      * @return MagneticFlux; scalar as a multiplication of Dimensionless and MagneticFlux
659      */
660     public final MagneticFlux times(final MagneticFlux v)
661     {
662         return new MagneticFlux(this.si * v.si, MagneticFluxUnit.SI);
663     }
664 
665     /**
666      * Calculate the multiplication of Dimensionless and Mass, which results in a Mass scalar.
667      * @param v Dimensionless; scalar
668      * @return Mass; scalar as a multiplication of Dimensionless and Mass
669      */
670     public final Mass times(final Mass v)
671     {
672         return new Mass(this.si * v.si, MassUnit.SI);
673     }
674 
675     /**
676      * Calculate the multiplication of Dimensionless and Power, which results in a Power scalar.
677      * @param v Dimensionless; scalar
678      * @return Power; scalar as a multiplication of Dimensionless and Power
679      */
680     public final Power times(final Power v)
681     {
682         return new Power(this.si * v.si, PowerUnit.SI);
683     }
684 
685     /**
686      * Calculate the multiplication of Dimensionless and Pressure, which results in a Pressure scalar.
687      * @param v Dimensionless; scalar
688      * @return Pressure; scalar as a multiplication of Dimensionless and Pressure
689      */
690     public final Pressure times(final Pressure v)
691     {
692         return new Pressure(this.si * v.si, PressureUnit.SI);
693     }
694 
695     /**
696      * Calculate the multiplication of Dimensionless and RadioActivity, which results in a RadioActivity scalar.
697      * @param v Dimensionless; scalar
698      * @return RadioActivity; scalar as a multiplication of Dimensionless and RadioActivity
699      */
700     public final RadioActivity times(final RadioActivity v)
701     {
702         return new RadioActivity(this.si * v.si, RadioActivityUnit.SI);
703     }
704 
705     /**
706      * Calculate the multiplication of Dimensionless and Speed, which results in a Speed scalar.
707      * @param v Dimensionless; scalar
708      * @return Speed; scalar as a multiplication of Dimensionless and Speed
709      */
710     public final Speed times(final Speed v)
711     {
712         return new Speed(this.si * v.si, SpeedUnit.SI);
713     }
714 
715     /**
716      * Calculate the multiplication of Dimensionless and Temperature, which results in a Temperature scalar.
717      * @param v Dimensionless; scalar
718      * @return Temperature; scalar as a multiplication of Dimensionless and Temperature
719      */
720     public final Temperature times(final Temperature v)
721     {
722         return new Temperature(this.si * v.si, TemperatureUnit.SI);
723     }
724 
725     /**
726      * Calculate the multiplication of Dimensionless and Duration, which results in a Duration scalar.
727      * @param v Dimensionless; scalar
728      * @return Duration; scalar as a multiplication of Dimensionless and Duration
729      */
730     public final Duration times(final Duration v)
731     {
732         return new Duration(this.si * v.si, DurationUnit.SI);
733     }
734 
735     /**
736      * Calculate the multiplication of Dimensionless and Torque, which results in a Torque scalar.
737      * @param v Dimensionless; scalar
738      * @return Torque; scalar as a multiplication of Dimensionless and Torque
739      */
740     public final Torque times(final Torque v)
741     {
742         return new Torque(this.si * v.si, TorqueUnit.SI);
743     }
744 
745     /**
746      * Calculate the multiplication of Dimensionless and Volume, which results in a Volume scalar.
747      * @param v Dimensionless; scalar
748      * @return Volume; scalar as a multiplication of Dimensionless and Volume
749      */
750     public final Volume times(final Volume v)
751     {
752         return new Volume(this.si * v.si, VolumeUnit.SI);
753     }
754 
755     /**
756      * Calculate the division of Dimensionless and Length, which results in a LinearDensity scalar.
757      * @param v Dimensionless; scalar
758      * @return LinearDensity; scalar as a division of Dimensionless and Length
759      */
760     public final LinearDensity divide(final Length v)
761     {
762         return new LinearDensity(this.si / v.si, LinearDensityUnit.SI);
763     }
764 
765     /**
766      * Calculate the division of Dimensionless and LinearDensity, which results in a Length scalar.
767      * @param v Dimensionless; scalar
768      * @return Length; scalar as a division of Dimensionless and LinearDensity
769      */
770     public final Length divide(final LinearDensity v)
771     {
772         return new Length(this.si / v.si, LengthUnit.SI);
773     }
774 
775     /**
776      * Calculate the division of Dimensionless and Duration, which results in a Frequency scalar.
777      * @param v Dimensionless; scalar
778      * @return Frequency; scalar as a division of Dimensionless and Duration
779      */
780     public final Frequency divide(final Duration v)
781     {
782         return new Frequency(this.si / v.si, FrequencyUnit.SI);
783     }
784 
785     /**
786      * Calculate the division of Dimensionless and Frequency, which results in a Duration scalar.
787      * @param v Dimensionless; scalar
788      * @return Duration; scalar as a division of Dimensionless and Frequency
789      */
790     public final Duration divide(final Frequency v)
791     {
792         return new Duration(this.si / v.si, DurationUnit.SI);
793     }
794 
795     /**
796      * Calculate the division of Dimensionless and ElectricalConductance, which results in a ElectricalResistance scalar.
797      * @param v Dimensionless; scalar
798      * @return ElectricalResistance; scalar as a division of Dimensionless and ElectricalConductance
799      */
800     public final ElectricalResistance divide(final ElectricalConductance v)
801     {
802         return new ElectricalResistance(this.si / v.si, ElectricalResistanceUnit.SI);
803     }
804 
805     /**
806      * Calculate the division of Dimensionless and ElectricalResistance, which results in a ElectricalConductance scalar.
807      * @param v Dimensionless; scalar
808      * @return ElectricalConductance; scalar as a division of Dimensionless and ElectricalResistance
809      */
810     public final ElectricalConductance divide(final ElectricalResistance v)
811     {
812         return new ElectricalConductance(this.si / v.si, ElectricalConductanceUnit.SI);
813     }
814 
815     @Override
816     public Dimensionless reciprocal()
817     {
818         return Dimensionless.instantiateSI(1.0 / this.si);
819     }
820 
821 }