Class ValueMap

java.lang.Object
meteordevelopment.starscript.value.ValueMap

public class ValueMap extends Object
Simpler wrapper around a map that goes from String to Supplier for Value.
  • Constructor Details

    • ValueMap

      public ValueMap()
  • Method Details

    • set

      public ValueMap set(String name, Supplier<Value> supplier)
      Sets a variable supplier for the provided name.
    • set

      public ValueMap set(String name, Value value)
      Sets a variable supplier that always returns the same value for the provided name.
    • set

      public ValueMap set(String name, boolean bool)
      Sets a boolean variable supplier that always returns the same value for the provided name.
    • set

      public ValueMap set(String name, double number)
      Sets a number variable supplier that always returns the same value for the provided name.
    • set

      public ValueMap set(String name, String string)
      Sets a string variable supplier that always returns the same value for the provided name.
    • set

      public ValueMap set(String name, SFunction function)
      Sets a function variable supplier that always returns the same value for the provided name.
    • set

      public ValueMap set(String name, ValueMap map)
      Sets a map variable supplier that always returns the same value for the provided name.
    • get

      public Supplier<Value> get(String name)
      Gets the variable supplier for the provided name.
    • keys

      public Set<String> keys()
      Returns a set of all variable names.