aboutsummaryrefslogtreecommitdiff
path: root/src/utils/lombok
diff options
context:
space:
mode:
Diffstat (limited to 'src/utils/lombok')
-rw-r--r--src/utils/lombok/core/LombokImmutableList.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/utils/lombok/core/LombokImmutableList.java b/src/utils/lombok/core/LombokImmutableList.java
index e0e1136c..4603f2ad 100644
--- a/src/utils/lombok/core/LombokImmutableList.java
+++ b/src/utils/lombok/core/LombokImmutableList.java
@@ -80,6 +80,12 @@ public final class LombokImmutableList<T> implements Iterable<T> {
return copyOf(list);
}
+ public static <T> LombokImmutableList<T> copyOf(T[] array) {
+ Object[] content = new Object[array.length];
+ System.arraycopy(array, 0, content, 0, array.length);
+ return new LombokImmutableList<T>(content);
+ }
+
private LombokImmutableList(Object[] content) {
this.content = content;
}