Package edu.wpi.first.units.measure
Record Class ImmutableAngularVelocity
java.lang.Object
java.lang.Record
edu.wpi.first.units.measure.ImmutableAngularVelocity
- All Implemented Interfaces:
Measure<AngularVelocityUnit>
,AngularVelocity
,Comparable<Measure<AngularVelocityUnit>>
public record ImmutableAngularVelocity(double magnitude, double baseUnitMagnitude, AngularVelocityUnit unit)
extends Record
implements AngularVelocity
-
Field Summary
Fields inherited from interface edu.wpi.first.units.Measure
EQUIVALENCE_THRESHOLD
-
Constructor Summary
ConstructorDescriptionImmutableAngularVelocity
(double magnitude, double baseUnitMagnitude, AngularVelocityUnit unit) Creates an instance of aImmutableAngularVelocity
record class. -
Method Summary
Modifier and TypeMethodDescriptiondouble
Returns the value of thebaseUnitMagnitude
record component.copy()
Returns an immutable copy of this measure.boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.double
Returns the value of themagnitude
record component.toString()
Returns a string representation of this record class.unit()
Returns the value of theunit
record component.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface edu.wpi.first.units.measure.AngularVelocity
asFrequency, 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, 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
Methods inherited from interface edu.wpi.first.units.Measure
abs, compareTo, copySign, div, divide, divideRatio, gt, gte, isEquivalent, isNear, isNear, lt, lte, times, timesConversionFactor, timesInverse, timesRatio, toLongString, toShortString
-
Constructor Details
-
ImmutableAngularVelocity
public ImmutableAngularVelocity(double magnitude, double baseUnitMagnitude, AngularVelocityUnit unit) Creates an instance of aImmutableAngularVelocity
record class.- Parameters:
magnitude
- the value for themagnitude
record componentbaseUnitMagnitude
- the value for thebaseUnitMagnitude
record componentunit
- the value for theunit
record component
-
-
Method Details
-
copy
Description copied from interface:Measure
Returns an immutable copy of this measure. The copy can be used freely and is guaranteed never to change.- Specified by:
copy
in interfaceAngularVelocity
- Specified by:
copy
in interfaceMeasure<AngularVelocityUnit>
- Returns:
- the copied measure
-
toString
Returns 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. -
equals
Indicates 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 '=='. -
hashCode
Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
magnitude
Returns the value of themagnitude
record component.- Specified by:
magnitude
in interfaceMeasure<AngularVelocityUnit>
- Returns:
- the value of the
magnitude
record component
-
baseUnitMagnitude
Returns the value of thebaseUnitMagnitude
record component.- Specified by:
baseUnitMagnitude
in interfaceMeasure<AngularVelocityUnit>
- Returns:
- the value of the
baseUnitMagnitude
record component
-
unit
Returns the value of theunit
record component.- Specified by:
unit
in interfaceAngularVelocity
- Specified by:
unit
in interfaceMeasure<AngularVelocityUnit>
- Returns:
- the value of the
unit
record component
-