Package studio.mevera.imperat.context
Interface ArgumentInput
- All Superinterfaces:
Cloneable,Collection<String>,Deque<String>,Iterable<String>,List<String>,Queue<String>
@AvailableSince("1.0.0")
public interface ArgumentInput
extends Deque<String>, List<String>, Cloneable
Represents a custom data structure made specifically
for handling the arguments entered by the
Source-
Method Summary
Modifier and TypeMethodDescription@NotNull ArgumentInputcopy()Returns an independent copy of this argument stack.static ArgumentInputempty()default @Nullable StringFetches the element at the specified index@NotNull StringJoins all present arguments in this stack, starting from the specified index@NotNull StringJoins all present arguments in this stackstatic ArgumentInputstatic ArgumentInputstatic ArgumentInputstatic ArgumentInputparseAutoCompletion(String[] argumentsOnly, boolean extraLastSpace) static ArgumentInputparseAutoCompletion(String string, boolean extraLastSpace) Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArrayMethods inherited from interface java.util.Deque
add, addAll, addFirst, addLast, contains, descendingIterator, element, getFirst, getLast, iterator, offer, offerFirst, offerLast, peek, peekFirst, peekLast, poll, pollFirst, pollLast, pop, push, remove, remove, removeFirst, removeFirstOccurrence, removeLast, removeLastOccurrence, sizeMethods inherited from interface java.util.List
add, add, addAll, addAll, clear, contains, containsAll, equals, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray
-
Method Details
-
parse
-
parse
-
parseAutoCompletion
-
parseAutoCompletion
-
of
- Returns:
- a new, empty
ArgumentInput.
-
empty
- Returns:
- a new, empty
ArgumentInput.
-
getOriginalRaw
String getOriginalRaw() -
getOr
Fetches the element at the specified index- Parameters:
index- the indexdef- the default element- Returns:
- the element at the specified index.
-
join
Joins all present arguments in this stack- Parameters:
delimiter- Delimiter between these arguments.- Returns:
- The combined string
-
join
Joins all present arguments in this stack, starting from the specified index- Parameters:
delimiter- Delimiter between these argumentsstartIndex- The start index to combine from- Returns:
- The combined string
-
copy
Returns an independent copy of this argument stack.- Returns:
- A copy of this argument stack
-