Skip to content

Commit

Permalink
Rename ExecutionEnv::createDefault() to ExecutionEnv::defaulted()
Browse files Browse the repository at this point in the history
  • Loading branch information
FourteenBrush committed Jun 13, 2024
1 parent bfd944c commit b112670
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,6 @@ public static void insertSymbol(Symbol symbol) {
}

static class DefaultEnvHolder {
static final ExecutionEnv DEFAULT_ENV = ExecutionEnv.createDefault();
static final ExecutionEnv DEFAULT_ENV = ExecutionEnv.defaulted();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import java.util.regex.Pattern;

// TODO: add support for removing/ inserting if absent
// TODO: overloads for ifAbsent

/**
* An environment instance, to which symbols can be bound.
Expand All @@ -40,7 +41,7 @@ public static ExecutionEnv empty() {
* @return a {@link ExecutionEnv} populated with all default symbols.
*/
@ApiStatus.Experimental
public static ExecutionEnv createDefault() {
public static ExecutionEnv defaulted() {
// delegate to BuiltinSymbols to not clutter up this class
return BuiltinSymbols.createExecutionEnv();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ public class Main {
private static boolean running = true;

public static void main(String[] args) {
ExecutionEnv env = ExecutionEnv.createDefault();
ExecutionEnv env = ExecutionEnv.defaulted();
env.insertFunction("exit", () -> {
running = false;
return 0;
Expand Down

0 comments on commit b112670

Please sign in to comment.