com.github.longdt.vertxservice.util.ImmutableList Maven / Gradle / Ivy
package com.github.longdt.vertxservice.util;
import io.vertx.core.shareddata.Shareable;
import java.util.ArrayList;
import java.util.List;
public class ImmutableList implements Shareable {
private final List data;
private ImmutableList(List data) {
this.data = data;
}
public static ImmutableList of(List data) {
return new ImmutableList<>(data);
}
public List unwrap() {
return data;
}
@Override
public ImmutableList copy() {
return new ImmutableList<>(new ArrayList<>(data));
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy