Skip to content

Commit

Permalink
chill with the enum[] allocations
Browse files Browse the repository at this point in the history
  • Loading branch information
Lyfts committed Oct 16, 2024
1 parent 3b5c575 commit aecf79c
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -128,10 +128,12 @@ public String getValue(Value value) {
}
};

public static final Operation[] VALUES = values();

public abstract String getValue(Value value);

public static Operation fromString(String str) {
for (Operation op : values()) {
for (Operation op : VALUES) {
if (String.valueOf(op).equalsIgnoreCase(str)) {
return op;
}
Expand Down

0 comments on commit aecf79c

Please sign in to comment.