001// Copyright (c) FIRST and other WPILib contributors.
002// Open Source Software; you can modify and/or share it under the terms of
003// the WPILib BSD license file in the root directory of this project.
004
005package edu.wpi.first.math;
006
007//CHECKSTYLE.OFF: ImportOrder
008
009import edu.wpi.first.math.numbers.N0;
010import edu.wpi.first.math.numbers.N1;
011import edu.wpi.first.math.numbers.N2;
012import edu.wpi.first.math.numbers.N3;
013import edu.wpi.first.math.numbers.N4;
014import edu.wpi.first.math.numbers.N5;
015import edu.wpi.first.math.numbers.N6;
016import edu.wpi.first.math.numbers.N7;
017import edu.wpi.first.math.numbers.N8;
018import edu.wpi.first.math.numbers.N9;
019import edu.wpi.first.math.numbers.N10;
020import edu.wpi.first.math.numbers.N11;
021import edu.wpi.first.math.numbers.N12;
022import edu.wpi.first.math.numbers.N13;
023import edu.wpi.first.math.numbers.N14;
024import edu.wpi.first.math.numbers.N15;
025import edu.wpi.first.math.numbers.N16;
026import edu.wpi.first.math.numbers.N17;
027import edu.wpi.first.math.numbers.N18;
028import edu.wpi.first.math.numbers.N19;
029import edu.wpi.first.math.numbers.N20;
030//CHECKSTYLE.ON
031
032/**
033 * A natural number expressed as a java class.
034 * The counterpart to {@link Num} that should be used as a concrete value.
035 *
036 * @param <T> The {@link Num} this represents.
037 */
038public interface Nat<T extends Num> {
039  /**
040   * The number this interface represents.
041   *
042   * @return The number backing this value.
043   */
044  int getNum();
045
046  static Nat<N0> N0() {
047    return N0.instance;
048  }
049
050  static Nat<N1> N1() {
051    return N1.instance;
052  }
053
054  static Nat<N2> N2() {
055    return N2.instance;
056  }
057
058  static Nat<N3> N3() {
059    return N3.instance;
060  }
061
062  static Nat<N4> N4() {
063    return N4.instance;
064  }
065
066  static Nat<N5> N5() {
067    return N5.instance;
068  }
069
070  static Nat<N6> N6() {
071    return N6.instance;
072  }
073
074  static Nat<N7> N7() {
075    return N7.instance;
076  }
077
078  static Nat<N8> N8() {
079    return N8.instance;
080  }
081
082  static Nat<N9> N9() {
083    return N9.instance;
084  }
085
086  static Nat<N10> N10() {
087    return N10.instance;
088  }
089
090  static Nat<N11> N11() {
091    return N11.instance;
092  }
093
094  static Nat<N12> N12() {
095    return N12.instance;
096  }
097
098  static Nat<N13> N13() {
099    return N13.instance;
100  }
101
102  static Nat<N14> N14() {
103    return N14.instance;
104  }
105
106  static Nat<N15> N15() {
107    return N15.instance;
108  }
109
110  static Nat<N16> N16() {
111    return N16.instance;
112  }
113
114  static Nat<N17> N17() {
115    return N17.instance;
116  }
117
118  static Nat<N18> N18() {
119    return N18.instance;
120  }
121
122  static Nat<N19> N19() {
123    return N19.instance;
124  }
125
126  static Nat<N20> N20() {
127    return N20.instance;
128  }
129
130}