98 lines
3.6 KiB
Java
98 lines
3.6 KiB
Java
package com.discord.widgets.chat.input.autocomplete;
|
|
|
|
import c.d.b.a.a;
|
|
import com.discord.models.commands.Application;
|
|
import com.discord.models.commands.ApplicationCommand;
|
|
import d0.z.d.m;
|
|
import java.util.List;
|
|
/* compiled from: Autocompletable.kt */
|
|
public final class ApplicationCommandAutocompletable extends Autocompletable {
|
|
private final Application application;
|
|
private final ApplicationCommand command;
|
|
|
|
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
|
|
public ApplicationCommandAutocompletable(Application application, ApplicationCommand applicationCommand) {
|
|
super(null);
|
|
m.checkNotNullParameter(applicationCommand, "command");
|
|
this.application = application;
|
|
this.command = applicationCommand;
|
|
}
|
|
|
|
public static /* synthetic */ ApplicationCommandAutocompletable copy$default(ApplicationCommandAutocompletable applicationCommandAutocompletable, Application application, ApplicationCommand applicationCommand, int i, Object obj) {
|
|
if ((i & 1) != 0) {
|
|
application = applicationCommandAutocompletable.application;
|
|
}
|
|
if ((i & 2) != 0) {
|
|
applicationCommand = applicationCommandAutocompletable.command;
|
|
}
|
|
return applicationCommandAutocompletable.copy(application, applicationCommand);
|
|
}
|
|
|
|
public final Application component1() {
|
|
return this.application;
|
|
}
|
|
|
|
public final ApplicationCommand component2() {
|
|
return this.command;
|
|
}
|
|
|
|
public final ApplicationCommandAutocompletable copy(Application application, ApplicationCommand applicationCommand) {
|
|
m.checkNotNullParameter(applicationCommand, "command");
|
|
return new ApplicationCommandAutocompletable(application, applicationCommand);
|
|
}
|
|
|
|
public boolean equals(Object obj) {
|
|
if (this == obj) {
|
|
return true;
|
|
}
|
|
if (!(obj instanceof ApplicationCommandAutocompletable)) {
|
|
return false;
|
|
}
|
|
ApplicationCommandAutocompletable applicationCommandAutocompletable = (ApplicationCommandAutocompletable) obj;
|
|
return m.areEqual(this.application, applicationCommandAutocompletable.application) && m.areEqual(this.command, applicationCommandAutocompletable.command);
|
|
}
|
|
|
|
public final Application getApplication() {
|
|
return this.application;
|
|
}
|
|
|
|
public final ApplicationCommand getCommand() {
|
|
return this.command;
|
|
}
|
|
|
|
@Override // com.discord.widgets.chat.input.autocomplete.Autocompletable
|
|
public String getInputReplacement() {
|
|
return leadingIdentifier().getIdentifier() + this.command.getName();
|
|
}
|
|
|
|
@Override // com.discord.widgets.chat.input.autocomplete.Autocompletable
|
|
public List<String> getInputTextMatchers() {
|
|
return d0.t.m.listOf(leadingIdentifier().getIdentifier() + this.command.getName());
|
|
}
|
|
|
|
public int hashCode() {
|
|
Application application = this.application;
|
|
int i = 0;
|
|
int hashCode = (application != null ? application.hashCode() : 0) * 31;
|
|
ApplicationCommand applicationCommand = this.command;
|
|
if (applicationCommand != null) {
|
|
i = applicationCommand.hashCode();
|
|
}
|
|
return hashCode + i;
|
|
}
|
|
|
|
@Override // com.discord.widgets.chat.input.autocomplete.Autocompletable
|
|
public LeadingIdentifier leadingIdentifier() {
|
|
return LeadingIdentifier.APP_COMMAND;
|
|
}
|
|
|
|
public String toString() {
|
|
StringBuilder L = a.L("ApplicationCommandAutocompletable(application=");
|
|
L.append(this.application);
|
|
L.append(", command=");
|
|
L.append(this.command);
|
|
L.append(")");
|
|
return L.toString();
|
|
}
|
|
}
|