Package com.csse3200.game.ui.terminal
Class Shell.Range
java.lang.Object
com.csse3200.game.ui.terminal.Shell.Range
- Enclosing class:
Shell
Represents a numerical range that can be iterated over.
This is intended for shell use only
-
Constructor Details
-
Range
public Range(long start, long end) Creates a range with a step of 1.- Parameters:
start
- The starting value (inclusive).end
- The ending value (inclusive).
-
Range
public Range(long start, long end, long step) Creates a range with a specified step.- Parameters:
start
- The starting value (inclusive).end
- The ending value (inclusive).step
- The increment value.
-
-
Method Details
-
hasNext
public boolean hasNext()Checks if the iteration has more elements. -
next
Returns the next element in the iteration.
-