mirror of
https://github.com/magefree/mage.git
synced 2025-12-25 13:02:06 -08:00
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
|
|
@ -69,7 +69,7 @@ public class CardUtil {
|
|||
|
||||
private static final String SOURCE_EXILE_ZONE_TEXT = "SourceExileZone";
|
||||
|
||||
static String numberStrings[] = {"zero", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine",
|
||||
static final String[] numberStrings = {"zero", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine",
|
||||
"ten", "eleven", "twelve", "thirteen", "fourteen", "fifteen", "sixteen", "seventeen", "eighteen", "ninteen", "twenty"};
|
||||
|
||||
public static final String[] NON_CHANGELING_SUBTYPES_VALUES = new String[]{
|
||||
|
|
|
|||
|
|
@ -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() {
|
||||
|
|
|
|||
|
|
@ -32,7 +32,6 @@ import java.io.IOException;
|
|||
import java.io.InputStream;
|
||||
import java.io.ObjectInputStream;
|
||||
import java.io.ObjectStreamClass;
|
||||
import java.io.StreamCorruptedException;
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
|
|||
|
|
@ -42,9 +42,9 @@ import mage.target.Target;
|
|||
*/
|
||||
public class TargetAddress {
|
||||
|
||||
protected int spellAbilityIndex;
|
||||
protected UUID mode;
|
||||
protected int targetIndex;
|
||||
protected final int spellAbilityIndex;
|
||||
protected final UUID mode;
|
||||
protected final int targetIndex;
|
||||
|
||||
public TargetAddress(int spellAbilityIndex, UUID mode, int targetIndex) {
|
||||
this.spellAbilityIndex = spellAbilityIndex;
|
||||
|
|
@ -68,7 +68,7 @@ public class TargetAddress {
|
|||
|
||||
protected static class TargetAddressIterator implements Iterator<TargetAddress> {
|
||||
|
||||
protected Iterator<SpellAbility> spellAbilityIterator;
|
||||
protected final Iterator<SpellAbility> spellAbilityIterator;
|
||||
protected Integer lastSpellAbilityIndex = null;
|
||||
protected Iterator<UUID> modeIterator = null;
|
||||
protected Modes modes = null;
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ package mage.util;
|
|||
*/
|
||||
public class ThreadLocalStringBuilder extends ThreadLocal<StringBuilder> {
|
||||
|
||||
private int size;
|
||||
private final int size;
|
||||
|
||||
public ThreadLocalStringBuilder(int size) {
|
||||
this.size = size;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue