public class Core extends Object
| Constructor and Description |
|---|
Core() |
| Modifier and Type | Method and Description |
|---|---|
static String |
ask(String prompt)
Asks for input from the user.
|
static void |
doIf(boolean condition,
Runnable ifTrue)
Checks if something is true and does something if it is.
|
static void |
doIf(boolean condition,
Runnable ifTrue,
Runnable elseDo)
Checks if something is true and does something if it is.
|
static void |
forever(Runnable toRun)
Runs code forever
|
static String |
get(String name)
Gets a variable
|
static String |
join(String one,
String two)
Joins text together
|
static void |
remove(String name)
Deletes a variable
|
static void |
say(String text)
Says something in the console.
|
static void |
set(String name,
String val)
Sets/adds a variable
|
static void |
waitFor(int seconds)
Waits for a number of seconds
|
public static void say(String text)
say("Hello");text - The text you want to be said in the console.public static void doIf(boolean condition,
Runnable ifTrue)
condition - The condition to checkifTrue - What to do if truedoIf(boolean, Runnable, Runnable)public static void doIf(boolean condition,
Runnable ifTrue,
Runnable elseDo)
condition - The condition to checkifTrue - What to do if trueelseDo - What to do if falsedoIf(boolean, Runnable)public static void set(String name, String val)
name - The name of the variableval - The value of the variablepublic static String get(String name)
name - Name of the variablepublic static void remove(String name)
name - The name of the variablepublic static void forever(Runnable toRun)
toRun - What to runpublic static void waitFor(int seconds)
seconds - The seconds to wait forpublic static String ask(String prompt)
prompt - The prompt to prompt the user withCopyright © 2021. All rights reserved.