Package edu.wpi.first.units.measure
Record Class ImmutableTime
java.lang.Object
java.lang.Record
edu.wpi.first.units.measure.ImmutableTime
public record ImmutableTime(double magnitude, double baseUnitMagnitude, TimeUnit unit)
extends Record
implements Time
- 
Field SummaryFields inherited from interface edu.wpi.first.units.MeasureEQUIVALENCE_THRESHOLD
- 
Constructor SummaryConstructorsConstructorDescriptionImmutableTime(double magnitude, double baseUnitMagnitude, TimeUnit unit) Creates an instance of aImmutableTimerecord class.
- 
Method SummaryModifier and TypeMethodDescriptiondoubleReturns the value of thebaseUnitMagnituderecord component.copy()Returns an immutable copy of this measure.booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.doubleReturns the value of themagnituderecord component.toString()Returns a string representation of this record class.unit()Returns the value of theunitrecord component.Methods inherited from class java.lang.Objectclone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface edu.wpi.first.units.Measureabs, compareTo, copySign, div, divide, divideRatio, gt, gte, isEquivalent, isNear, isNear, lt, lte, times, timesConversionFactor, timesInverse, timesRatio, toLongString, toShortStringMethods inherited from interface edu.wpi.first.units.measure.TimeasFrequency, baseUnit, div, div, div, div, div, div, div, div, div, div, div, div, div, div, div, div, div, div, div, div, div, div, div, div, div, div, divide, divide, divide, divide, divide, divide, divide, divide, divide, divide, divide, divide, divide, divide, divide, divide, divide, divide, divide, divide, divide, divide, divide, divide, divide, divide, in, minus, mutableCopy, negate, per, per, per, per, per, per, per, per, per, per, per, per, per, per, per, per, per, per, per, per, per, per, per, per, plus, times, times, times, times, times, times, times, times, times, times, times, times, times, times, times, times, times, times, times, times, times, times, times, times, times, times, unaryMinus
- 
Constructor Details- 
ImmutableTimeCreates an instance of aImmutableTimerecord class.- Parameters:
- magnitude- the value for the- magnituderecord component
- baseUnitMagnitude- the value for the- baseUnitMagnituderecord component
- unit- the value for the- unitrecord component
 
 
- 
- 
Method Details- 
copyDescription copied from interface:MeasureReturns an immutable copy of this measure. The copy can be used freely and is guaranteed never to change.
- 
toStringReturns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
- 
equalsIndicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='.
- 
hashCodeReturns a hash code value for this object. The value is derived from the hash code of each of the record components.
- 
magnitudeReturns the value of themagnituderecord component.
- 
baseUnitMagnitudeReturns the value of thebaseUnitMagnituderecord component.- Specified by:
- baseUnitMagnitudein interface- Measure<TimeUnit>
- Returns:
- the value of the baseUnitMagnituderecord component
 
- 
unitReturns the value of theunitrecord component.
 
-