[build] Apply spotless for java formatting (#1768)

Update checkstyle config to be compatible with spotless.

Co-authored-by: Austin Shalit <austinshalit@gmail.com>
This commit is contained in:
Peter Johnson
2020-12-29 22:45:16 -08:00
committed by GitHub
parent e563a0b7db
commit a751fa22d2
883 changed files with 16526 additions and 17751 deletions

View File

@@ -4,9 +4,7 @@
package edu.wpi.first.hal;
/**
* A wrapper around a simulator device handle.
*/
/** A wrapper around a simulator device handle. */
public class SimDevice implements AutoCloseable {
public enum Direction {
kInput(SimDeviceJNI.kInput),
@@ -23,10 +21,9 @@ public class SimDevice implements AutoCloseable {
/**
* Creates a simulated device.
*
* <p>The device name must be unique. Returns null if the device name
* already exists. If multiple instances of the same device are desired,
* recommend appending the instance/unique identifer in brackets to the base
* name, e.g. "device[1]".
* <p>The device name must be unique. Returns null if the device name already exists. If multiple
* instances of the same device are desired, recommend appending the instance/unique identifer in
* brackets to the base name, e.g. "device[1]".
*
* <p>null is returned if not in simulation.
*
@@ -44,10 +41,9 @@ public class SimDevice implements AutoCloseable {
/**
* Creates a simulated device.
*
* <p>The device name must be unique. Returns null if the device name
* already exists. This is a convenience method that appends index in
* brackets to the device name, e.g. passing index=1 results in "device[1]"
* for the device name.
* <p>The device name must be unique. Returns null if the device name already exists. This is a
* convenience method that appends index in brackets to the device name, e.g. passing index=1
* results in "device[1]" for the device name.
*
* <p>null is returned if not in simulation.
*
@@ -62,10 +58,9 @@ public class SimDevice implements AutoCloseable {
/**
* Creates a simulated device.
*
* <p>The device name must be unique. Returns null if the device name
* already exists. This is a convenience method that appends index and
* channel in brackets to the device name, e.g. passing index=1 and channel=2
* results in "device[1,2]" for the device name.
* <p>The device name must be unique. Returns null if the device name already exists. This is a
* convenience method that appends index and channel in brackets to the device name, e.g. passing
* index=1 and channel=2 results in "device[1,2]" for the device name.
*
* <p>null is returned if not in simulation.
*
@@ -110,7 +105,6 @@ public class SimDevice implements AutoCloseable {
* @param readonly if the value should not be written from simulation side
* @param initialValue initial value
* @return simulated value object
*
* @deprecated Use direction function instead
*/
@Deprecated
@@ -145,7 +139,6 @@ public class SimDevice implements AutoCloseable {
* @param readonly if the value should not be written from simulation side
* @param initialValue initial value
* @return simulated double value object
*
* @deprecated Use direction function instead
*/
@Deprecated
@@ -183,7 +176,6 @@ public class SimDevice implements AutoCloseable {
* @param options array of option descriptions
* @param initialValue initial value (selection)
* @return simulated enum value object
*
* @deprecated Use direction function instead
*/
@Deprecated
@@ -205,8 +197,8 @@ public class SimDevice implements AutoCloseable {
* @return simulated enum value object
*/
public SimEnum createEnum(String name, Direction direction, String[] options, int initialValue) {
int handle = SimDeviceJNI.createSimValueEnum(m_handle, name, direction.m_value, options,
initialValue);
int handle =
SimDeviceJNI.createSimValueEnum(m_handle, name, direction.m_value, options, initialValue);
if (handle <= 0) {
return null;
}
@@ -227,10 +219,11 @@ public class SimDevice implements AutoCloseable {
* @param initialValue initial value (selection)
* @return simulated enum value object
*/
public SimEnum createEnumDouble(String name, Direction direction, String[] options,
double[] optionValues, int initialValue) {
int handle = SimDeviceJNI.createSimValueEnumDouble(m_handle, name, direction.m_value, options,
optionValues, initialValue);
public SimEnum createEnumDouble(
String name, Direction direction, String[] options, double[] optionValues, int initialValue) {
int handle =
SimDeviceJNI.createSimValueEnumDouble(
m_handle, name, direction.m_value, options, optionValues, initialValue);
if (handle <= 0) {
return null;
}
@@ -246,7 +239,6 @@ public class SimDevice implements AutoCloseable {
* @param readonly if the value should not be written from simulation side
* @param initialValue initial value
* @return simulated boolean value object
*
* @deprecated Use direction function instead
*/
@Deprecated
@@ -265,8 +257,8 @@ public class SimDevice implements AutoCloseable {
* @return simulated boolean value object
*/
public SimBoolean createBoolean(String name, Direction direction, boolean initialValue) {
int handle = SimDeviceJNI.createSimValueBoolean(m_handle, name, direction.m_value,
initialValue);
int handle =
SimDeviceJNI.createSimValueBoolean(m_handle, name, direction.m_value, initialValue);
if (handle <= 0) {
return null;
}