fix checkstyle errs

This commit is contained in:
Braydon 2024-04-28 03:55:22 -04:00
parent 298baf6eae
commit 19e69a1ed5
7 changed files with 13 additions and 8 deletions

@ -39,8 +39,8 @@ import java.util.function.Consumer;
/**
* An action that can be executed on a panel.
*
* @param <T> the type of response expected when this action is executed
* @author Braydon
* @param <T> the type of response expected when this action is executed
*/
@AllArgsConstructor(access = AccessLevel.PRIVATE)
public class PanelAction<T extends PanelModel<T>> {
@ -104,11 +104,11 @@ public class PanelAction<T extends PanelModel<T>> {
/**
* Create a new panel action.
*
* @param clientConfig the client config to use for executing actions
* @param clientConfig the client config to use for executing actions
* @param rateLimitHandler the rate limit handler to use for querying actions
* @param webRequest the web request to send for this action
* @param responseType the expected response type, null if none
* @param <T> the response type
* @param webRequest the web request to send for this action
* @param responseType the expected response type, null if none
* @param <T> the response type
* @return the panel action
*/
@NonNull

@ -51,6 +51,9 @@ public final class ClientConfig {
*/
private final boolean debugging;
/**
* The config builder.
*/
public static class ClientConfigBuilder {
@NonNull
public ClientConfigBuilder debugging(boolean state) {

@ -38,8 +38,8 @@ import java.io.Closeable;
/**
* A client for the API.
*
* @param <A> the actions for this client
* @author Braydon
* @param <A> the actions for this client
*/
@Getter @Accessors(fluent = true)
@Slf4j(topic = "Pelican4J Client")

@ -30,6 +30,7 @@ import lombok.*;
* A model for the panel.
*
* @author Braydon
* @param <T> The type of the value of this model
*/
@NoArgsConstructor @Setter @Getter @ToString
public class PanelModel<T> {

@ -70,8 +70,8 @@ public class JsonWebRequest {
*
* @param clientConfig the client config to use
* @param responseType the expected response type, null for none
* @return the response, null if none
* @param <T> the response type
* @return the response, null if none
*/
@SneakyThrows
public <T extends PanelModel<T>> T execute(@NonNull ClientConfig clientConfig, Class<T> responseType) {

@ -36,6 +36,7 @@ import java.util.function.BiConsumer;
* Represents a queued action.
*
* @author Braydon
* @param <T> the action response type
*/
@AllArgsConstructor(access = AccessLevel.PROTECTED) @Getter
public class QueuedAction<T extends PanelModel<T>> {

@ -108,8 +108,8 @@ public final class RateLimitHandler {
* @param callback the callback to invoke
* @param throwRateLimitErrors whether rate limit errors should be thrown
* @param retry should the action be retried if a rate limit is hit (and being thrown)?
* @return whether the request was successful
* @param <T> the action response type
* @return whether the request was successful
*/
@SuppressWarnings("unchecked")
public <T extends PanelModel<T>> boolean tryRequest(@NonNull PanelAction<?> action, BiConsumer<T, Exception> callback, boolean throwRateLimitErrors, boolean retry) {