Cache frequent Enum#values() calls (#86)

This commit is contained in:
Alexdoru authored and GitHub committed 2026-03-04 16:15:04 +01:00
1 parent 84d462d8d5
commit a48f59e0ed
64 files changed
+202 -121

No files matched your search

@@ -408,6 +408,9 @@ public enum EnumPattern implements IPattern {
private ILayout leftRotation;
private ILayout horizontalFlip;
/**
* Cached values() array for frequent read-only operations, the array should NOT be mutated.
*/
public static final EnumPattern[] VALUES = values();
EnumPattern() {