mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-23 01:21:42 +00:00
[docs] Add missing JavaDocs (#6125)
This commit is contained in:
@@ -4,7 +4,11 @@
|
||||
|
||||
package edu.wpi.first.util;
|
||||
|
||||
/** This is a simple circular buffer so we don't need to "bucket brigade" copy old values. */
|
||||
/**
|
||||
* This is a simple circular buffer so we don't need to "bucket brigade" copy old values.
|
||||
*
|
||||
* @param <T> Buffer element type.
|
||||
*/
|
||||
public class CircularBuffer<T> {
|
||||
private T[] m_data;
|
||||
|
||||
@@ -17,7 +21,7 @@ public class CircularBuffer<T> {
|
||||
/**
|
||||
* Create a CircularBuffer with the provided size.
|
||||
*
|
||||
* @param size The size of the circular buffer.
|
||||
* @param size Maximum number of buffer elements.
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public CircularBuffer(int size) {
|
||||
|
||||
@@ -10,6 +10,8 @@ import java.util.TreeMap;
|
||||
* Interpolating Tree Maps are used to get values at points that are not defined by making a guess
|
||||
* from points that are defined. This uses linear interpolation.
|
||||
*
|
||||
* @param <K> Key type.
|
||||
* @param <V> Value type.
|
||||
* @deprecated Use {@link edu.wpi.first.math.interpolation.InterpolatingDoubleTreeMap} instead
|
||||
*/
|
||||
@Deprecated(forRemoval = true, since = "2024")
|
||||
|
||||
@@ -8,20 +8,35 @@ import java.io.IOException;
|
||||
import java.nio.ByteBuffer;
|
||||
import java.util.concurrent.atomic.AtomicBoolean;
|
||||
|
||||
/** WPIUtil JNI. */
|
||||
public class WPIUtilJNI {
|
||||
static boolean libraryLoaded = false;
|
||||
static RuntimeLoader<WPIUtilJNI> loader = null;
|
||||
|
||||
/** Sets whether JNI should be loaded in the static block. */
|
||||
public static class Helper {
|
||||
private static AtomicBoolean extractOnStaticLoad = new AtomicBoolean(true);
|
||||
|
||||
/**
|
||||
* Returns true if the JNI should be loaded in the static block.
|
||||
*
|
||||
* @return True if the JNI should be loaded in the static block.
|
||||
*/
|
||||
public static boolean getExtractOnStaticLoad() {
|
||||
return extractOnStaticLoad.get();
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets whether the JNI should be loaded in the static block.
|
||||
*
|
||||
* @param load Whether the JNI should be loaded in the static block.
|
||||
*/
|
||||
public static void setExtractOnStaticLoad(boolean load) {
|
||||
extractOnStaticLoad.set(load);
|
||||
}
|
||||
|
||||
/** Utility class. */
|
||||
private Helper() {}
|
||||
}
|
||||
|
||||
static {
|
||||
@@ -137,4 +152,7 @@ public class WPIUtilJNI {
|
||||
*/
|
||||
public static native int[] waitForObjectsTimeout(int[] handles, double timeout)
|
||||
throws InterruptedException;
|
||||
|
||||
/** Utility class. */
|
||||
protected WPIUtilJNI() {}
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
package edu.wpi.first.util.struct;
|
||||
|
||||
public class BadSchemaException extends Exception {
|
||||
/** The bad schema field. */
|
||||
private final String m_field;
|
||||
|
||||
public BadSchemaException(String s) {
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
package edu.wpi.first.util.struct.parser;
|
||||
|
||||
public class ParseException extends Exception {
|
||||
/** The parser position. */
|
||||
private final int m_pos;
|
||||
|
||||
public ParseException(int pos, String s) {
|
||||
|
||||
Reference in New Issue
Block a user