use List interface instead of ArrayList implementation in several places
This commit is contained in:
@@ -1,18 +1,24 @@
|
||||
package eu.crushedpixel.replaymod.assets;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.Getter;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
public class CustomObjectRepository {
|
||||
|
||||
public CustomObjectRepository() {
|
||||
this.objects = new ArrayList<CustomImageObject>();
|
||||
}
|
||||
public CustomObjectRepository(List<CustomImageObject> objects) {
|
||||
setObjects(objects);
|
||||
}
|
||||
|
||||
public void setObjects(List<CustomImageObject> objects) {
|
||||
this.objects = new ArrayList<CustomImageObject>(objects);
|
||||
}
|
||||
|
||||
@Getter
|
||||
private ArrayList<CustomImageObject> objects;
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user