forked from External/mage
Properties can be final in these objects
This commit is contained in:
parent
33b9ec52b0
commit
b626bf6866
5 changed files with 12 additions and 13 deletions
|
|
@ -45,7 +45,7 @@ import java.util.concurrent.locks.ReentrantLock;
|
|||
public class CircularList<E> implements List<E>, Iterable<E>, Serializable {
|
||||
//TODO: might have to make E extend Copyable
|
||||
|
||||
protected List<E> list = new ArrayList<>();
|
||||
protected final List<E> list = new ArrayList<>();
|
||||
|
||||
protected final ReentrantLock lock = new ReentrantLock();
|
||||
|
||||
|
|
@ -357,8 +357,8 @@ public class CircularList<E> implements List<E>, Iterable<E>, Serializable {
|
|||
private class CircularIterator<E> implements Iterator<E> {
|
||||
|
||||
int cursor;
|
||||
int lastIndex;
|
||||
int curModCount;
|
||||
final int lastIndex;
|
||||
final int curModCount;
|
||||
boolean hasMoved = false;
|
||||
|
||||
private CircularIterator() {
|
||||
|
|
@ -399,9 +399,9 @@ public class CircularList<E> implements List<E>, Iterable<E>, Serializable {
|
|||
private class CircularListIterator<E> implements ListIterator<E> {
|
||||
|
||||
int cursor;
|
||||
int lastIndex;
|
||||
int firstIndex;
|
||||
int curModCount;
|
||||
final int lastIndex;
|
||||
final int firstIndex;
|
||||
final int curModCount;
|
||||
boolean hasMoved = false;
|
||||
|
||||
private CircularListIterator() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue