📚 Add missing @Since annotations

This commit is contained in:
Alexander Söderberg 2020-10-22 06:34:41 +02:00 committed by Alexander Söderberg
parent 60dd74915a
commit da0d586e52
5 changed files with 11 additions and 4 deletions

View file

@ -85,6 +85,7 @@ public interface ArgumentParser<C, T> {
* consume
*
* @return The number of arguments tha the parser expects
* @since 1.1.0
*/
default int getRequestedArgumentCount() {
return DEFAULT_ARGUMENT_COUNT;

View file

@ -201,7 +201,8 @@ public final class IntegerArgument<C> extends CommandArgument<C, Integer> {
public static @NonNull List<@NonNull String> getSuggestions(
final long min,
final long max,
final @NonNull String input) {
final @NonNull String input
) {
final Set<Long> numbers = new TreeSet<>();
try {

View file

@ -23,9 +23,6 @@
//
package cloud.commandframework.jda;
import java.util.Objects;
import java.util.Optional;
import net.dv8tion.jda.api.entities.ChannelType;
import net.dv8tion.jda.api.entities.MessageChannel;
import net.dv8tion.jda.api.entities.User;
@ -33,6 +30,9 @@ import net.dv8tion.jda.api.events.message.MessageReceivedEvent;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.checkerframework.checker.nullness.qual.Nullable;
import java.util.Objects;
import java.util.Optional;
/**
* Wrapper for {@link MessageReceivedEvent}
*/
@ -77,6 +77,7 @@ public class JDACommandSender {
* Get the message receive event
*
* @return Optional of the message receive event
* @since 1.1.0
*/
public final @NonNull Optional<MessageReceivedEvent> getEvent() {
return Optional.ofNullable(this.event);
@ -86,6 +87,7 @@ public class JDACommandSender {
* Get the user the command sender represents
*
* @return User that sent the message
* @since 1.1.0
*/
public final @NonNull User getUser() {
return this.user;

View file

@ -58,6 +58,7 @@ public class JDAGuildSender extends JDACommandSender {
* Get the member the command sender represents
*
* @return Member that sent the message
* @since 1.1.0
*/
public @NonNull Member getMember() {
return this.member;
@ -67,6 +68,7 @@ public class JDAGuildSender extends JDACommandSender {
* Get the channel the user sent the message in
*
* @return Channel that the message was sent in
* @since 1.1.0
*/
public @NonNull TextChannel getTextChannel() {
return this.channel;

View file

@ -56,6 +56,7 @@ public class JDAPrivateSender extends JDACommandSender {
* Get the channel the user sent the message in
*
* @return Channel that the message was sent in
* @since 1.1.0
*/
public @NonNull PrivateChannel getPrivateChannel() {
return this.channel;