Files
allwpilib/wpiunits/src/generate/main/java/Measure-immutable.java.jinja
Tyler Veness 9ac7e286f5 [build] Upgrade Gradle plugins (#8166)
I upgraded all plugins I could see except org.ysb33r.doxygen. 2.0 made
breaking changes, and I couldn't figure out how to migrate.

Most of the changes are for suppressing new linter purification rites.
2025-08-08 23:04:02 -07:00

29 lines
899 B
Django/Jinja

// Copyright (c) FIRST and other WPILib contributors.
// Open Source Software; you can modify and/or share it under the terms of
// the WPILib BSD license file in the root directory of this project.
// THIS FILE WAS AUTO-GENERATED BY ./wpiunits/generate_units.py. DO NOT MODIFY
package edu.wpi.first.units.measure;
import static edu.wpi.first.units.Units.*;
import edu.wpi.first.units.*;
@SuppressWarnings({"unchecked", "cast", "checkstyle"})
public record Immutable{{ helpers['type_decl'](name) }}(double magnitude, double baseUnitMagnitude, {{ helpers['mtou'](name) }} unit) implements {{ helpers['type_usage'](name) }} {
@Override
public {{ helpers['type_usage'](name) }} copy() {
return this;
}
@Override
public String toString() {
return toShortString();
}
@Override
public boolean equals(Object o) {
return o instanceof Measure<?> m && isEquivalent(m);
}
}