java.lang.Object
io.github.javaezlib.javaez.extensions.Core

public class Core extends Object
The core functions of JavaEZ, usually implemented in every JavaEZ project.
Since:
1.0
Author:
Red050911
  • Constructor Details

    • Core

      public Core()
  • Method Details

    • say

      public static void say(String text)
      Says something in the console. An example of using this: say("Hello");
      Parameters:
      text - The text you want to be said in the console.
      Since:
      1.0
    • doIf

      public static void doIf(boolean condition, Runnable ifTrue)
      Checks if something is true and does something if it is.
      Parameters:
      condition - The condition to check
      ifTrue - What to do if true
      Since:
      1.0
      See Also:
    • doIf

      public static void doIf(boolean condition, Runnable ifTrue, Runnable elseDo)
      Checks if something is true and does something if it is. This one also runs something if not true.
      Parameters:
      condition - The condition to check
      ifTrue - What to do if true
      elseDo - What to do if false
      Since:
      1.0
      See Also:
    • set

      public static void set(String name, String val)
      Sets/adds a variable
      Parameters:
      name - The name of the variable
      val - The value of the variable
      Since:
      1.0
    • get

      public static String get(String name)
      Gets a variable
      Parameters:
      name - Name of the variable
      Returns:
      The variable's value, blank if none
      Since:
      1.0
    • remove

      public static void remove(String name)
      Deletes a variable
      Parameters:
      name - The name of the variable
      Since:
      1.0
    • forever

      public static void forever(Runnable toRun)
      Runs code forever
      Parameters:
      toRun - What to run
      Since:
      1.0
    • waitFor

      public static void waitFor(int seconds)
      Waits for a number of seconds
      Parameters:
      seconds - The seconds to wait for
      Since:
      1.0
    • ask

      public static String ask(String prompt)
      Asks for input from the user. This function will wait until input is received.
      Parameters:
      prompt - The prompt to prompt the user with
      Returns:
      What the user entered
      Since:
      1.1
    • join

      public static String join(String one, String two)
      Joins text together
      Parameters:
      one - one bit of text
      two - another bit of text
      Returns:
      the text joined together
      Since:
      1.2