discord-jadx/app/src/main/java/com/discord/widgets/chat/input/autocomplete/Autocompletable.java

62 lines
2.2 KiB
Java

package com.discord.widgets.chat.input.autocomplete;
import com.discord.utilities.collections.MultiListIterator;
import d0.z.d.m;
import java.util.Iterator;
import java.util.List;
import kotlin.jvm.internal.DefaultConstructorMarker;
/* compiled from: Autocompletable.kt */
public abstract class Autocompletable {
private Autocompletable() {
}
public /* synthetic */ Autocompletable(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
public List<String> getAutocompleteTextMatchers() {
return null;
}
public List<String> getHiddenInputTextMatchers() {
return null;
}
public abstract String getInputReplacement();
public abstract List<String> getInputTextMatchers();
public final Iterator<String> iterateAutocompleteMatchers() {
List<String> autocompleteTextMatchers = getAutocompleteTextMatchers();
if (autocompleteTextMatchers == null || autocompleteTextMatchers.isEmpty()) {
return getInputTextMatchers().iterator();
}
List<String> autocompleteTextMatchers2 = getAutocompleteTextMatchers();
m.checkNotNull(autocompleteTextMatchers2);
return new MultiListIterator(getInputTextMatchers(), autocompleteTextMatchers2);
}
public final Iterator<String> iterateTextMatchers() {
List<String> hiddenInputTextMatchers = getHiddenInputTextMatchers();
if (hiddenInputTextMatchers == null || hiddenInputTextMatchers.isEmpty()) {
return getInputTextMatchers().iterator();
}
List<String> hiddenInputTextMatchers2 = getHiddenInputTextMatchers();
m.checkNotNull(hiddenInputTextMatchers2);
return new MultiListIterator(getInputTextMatchers(), hiddenInputTextMatchers2);
}
public LeadingIdentifier leadingIdentifier() {
return LeadingIdentifier.NONE;
}
public final boolean matchesText(String str) {
m.checkNotNullParameter(str, "text");
if (getInputTextMatchers().contains(str)) {
return true;
}
List<String> hiddenInputTextMatchers = getHiddenInputTextMatchers();
return hiddenInputTextMatchers != null && hiddenInputTextMatchers.contains(str);
}
}