Class NumberedListScene
java.lang.Object
com.calebleavell.textinterface.scenes.GenericScene
com.calebleavell.textinterface.scenes.NumberedListScene
NumberedListScene
Displays a Numbered list of items to the user
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from class com.calebleavell.textinterface.scenes.GenericScene
MAX_ITERATIONS_ON_TOSTRING
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
Return a new instance based on the builder fields -
Method Summary
Modifier and TypeMethodDescriptionconvertStringListToTextSceneList
(String... strings) Converts an array of strings to a List of TextScenesgetList()
Getter for listint
Getter for startIndexvoid
run()
Executes the program as follows: 1.void
Setter for listvoid
setStartIndex
(int startIndex) Setter for startIndexMethods inherited from class com.calebleavell.textinterface.scenes.GenericScene
addChild, executeFunctions, getChild, getChild, getChild, getChild, getChildren, getFunctions, getID, getName, isTerminated, runChildren, setChildren, setName, terminate, toString, toString
-
Constructor Details
-
NumberedListScene
Return a new instance based on the builder fields- Parameters:
builder
- The new NumberedListScene
-
-
Method Details
-
getList
Getter for list- Returns:
- The list of iteme
-
setList
Setter for list- Parameters:
list
- the new list of items
-
getStartIndex
public int getStartIndex()Getter for startIndex- Returns:
- The start index
-
setStartIndex
public void setStartIndex(int startIndex) Setter for startIndex- Parameters:
startIndex
- The new start index
-
convertStringListToTextSceneList
Converts an array of strings to a List of TextScenes- Parameters:
strings
- The array of strings (varargs)- Returns:
- The list of TextScenes
-
run
Executes the program as follows: 1. Display list of items (assuming start index is n) : n: item 1 n + 1: item 2 n + 2: item 3 etc. 2. Runs super - runs children and functions- Specified by:
run
in interfaceFunction
- Overrides:
run
in classGenericScene
- Throws:
Exception
-