blob: 31451d2612c147fd65f154545be7d25f450e5145 [file] [log] [blame]
Austin Schuh812d0d12021-11-04 20:16:48 -07001// Copyright (c) FIRST and other WPILib contributors.
2// Open Source Software; you can modify and/or share it under the terms of
3// the WPILib BSD license file in the root directory of this project.
4
5package edu.wpi.first.math;
6
7//CHECKSTYLE.OFF: ImportOrder
8{% for num in nums %}
9import edu.wpi.first.math.numbers.N{{ num }};
10{%- endfor %}
11//CHECKSTYLE.ON
12
13/**
14 * A natural number expressed as a java class.
15 * The counterpart to {@link Num} that should be used as a concrete value.
16 *
17 * @param <T> The {@link Num} this represents.
18 */
19@SuppressWarnings({"MethodName", "unused"})
20public interface Nat<T extends Num> {
21 /**
22 * The number this interface represents.
23 *
24 * @return The number backing this value.
25 */
26 int getNum();
27{% for num in nums %}
28 static Nat<N{{ num }}> N{{ num }}() {
29 return N{{ num }}.instance;
30 }
31{% endfor %}
32}