Files
allwpilib/wpimath/src/generate/main/java/Nat.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

40 lines
1.0 KiB
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 ./wpimath/generate_numbers.py. DO NOT MODIFY
package edu.wpi.first.math;
// CHECKSTYLE.OFF: ImportOrder
{% for num in nums %}
import edu.wpi.first.math.numbers.N{{ num }};
{%- endfor %}
// CHECKSTYLE.ON
/**
* A natural number expressed as a java class.
* The counterpart to {@link Num} that should be used as a concrete value.
*
* @param <T> The {@link Num} this represents.
*/
@SuppressWarnings("PMD.ImplicitFunctionalInterface")
public interface Nat<T extends Num> {
/**
* The number this interface represents.
*
* @return The number backing this value.
*/
int getNum();
{% for num in nums %}
/**
* Returns the Nat instance for {{ num }}.
*
* @return The Nat instance for {{ num }}.
*/
static Nat<N{{ num }}> N{{ num }}() {
return N{{ num }}.instance;
}
{% endfor -%}
}