Interface ArgumentQueue
@NonExtendable
public interface ArgumentQueue
A queue of
Tag arguments.- Since:
- 4.10.0
-
Method Summary
Modifier and TypeMethodDescriptionbooleanhasNext()Get whether another argument is available to be popped.@Nullable Tag.Argumentpeek()Peek at the next argument without advancing the iteration pointer.pop()Pop an argument, throwing an exception if no argument was present.Pop an argument, throwing an exception if no argument was present.Pop an argument, throwing an exception if no argument was present.voidreset()Reset index to the beginning, to begin another attempt.
-
Method Details
-
pop
Tag.Argument pop()Pop an argument, throwing an exception if no argument was present.After an invocation of
pop(), the internal argument pointer will be advanced to the next argument.- Returns:
- the popped argument
- Since:
- 4.10.0
-
popOr
Pop an argument, throwing an exception if no argument was present.After an invocation of
popOr(), the internal argument pointer will be advanced to the next argument.- Parameters:
errorMessage- the error to throw if the argument is not present- Returns:
- the popped argument
- Since:
- 4.10.0
-
popOr
Pop an argument, throwing an exception if no argument was present.After an invocation of
popOr(), the internal argument pointer will be advanced to the next argument.- Parameters:
errorMessage- the error to throw if the argument is not present- Returns:
- the popped argument
- Since:
- 4.10.0
-
peek
@Nullable Tag.Argument peek()Peek at the next argument without advancing the iteration pointer.- Returns:
- the next argument, if any is available.
- Since:
- 4.10.0
-
hasNext
boolean hasNext()Get whether another argument is available to be popped.- Returns:
- whether another argument is available
- Since:
- 4.10.0
-
reset
void reset()Reset index to the beginning, to begin another attempt.- Since:
- 4.10.0
-