public abstract class ServerSelector extends Object
Constructor and Description |
---|
ServerSelector() |
Modifier and Type | Method and Description |
---|---|
static ServerSelector |
atIndex(int index)
Returns a
ServerSelector that selects the server description at the given index. |
static ServerSelector |
containing(String text)
Returns a
ServerSelector that selects the server description containing the given text. |
protected abstract boolean |
matches(Integer index,
String description)
Returns true if the server description at the given index matches this selector.
|
Optional<Integer> |
select(List<String> serverDescriptions)
Returns the index of the matching API server description.
|
public Optional<Integer> select(List<String> serverDescriptions)
public static ServerSelector atIndex(int index)
ServerSelector
that selects the server description at the given index.public static ServerSelector containing(String text)
ServerSelector
that selects the server description containing the given text.Copyright © 2024 The Cornutum Project. All rights reserved.