Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- this.array = (X[]) Array.newInstance(init.getClass(), size);
- // ...
- public List<X> get() {
- return Collections.<X>unmodifiableList(this.array);
- }
- public List<X> get() {
- return Collections.unmodifiableList(new ArrayList<>(this.array));
- }
- public List<X> get() {
- return Arrays.asList(this.array);
- }
- public List<X> get()
- {
- List<X> modifiableList = Arrays.asList( this.array );
- return Collections.unmodifiableList( modifiableList );
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement