Reduces visibility of internal fields/methods

Reduces the visibility of all fields to private and create setters/getters
when necessary. Exceptions are fields with GuiSync as these need to be
public.

Reduces the visibility of internal methods to private/protected/default when possible.
This commit is contained in:
yueh
2015-10-08 15:42:42 +02:00
parent 1ea48fb389
commit 500fc47490
463 changed files with 5670 additions and 3757 deletions
+10 -10
View File
@@ -62,14 +62,14 @@ public class TickHandler
{
public static final TickHandler INSTANCE = new TickHandler();
final Queue<IWorldCallable<?>> serverQueue = new LinkedList<IWorldCallable<?>>();
final Multimap<World, CraftingJob> craftingJobs = LinkedListMultimap.create();
private final Queue<IWorldCallable<?>> serverQueue = new LinkedList<IWorldCallable<?>>();
private final Multimap<World, CraftingJob> craftingJobs = LinkedListMultimap.create();
private final WeakHashMap<World, Queue<IWorldCallable<?>>> callQueue = new WeakHashMap<World, Queue<IWorldCallable<?>>>();
private final HandlerRep server = new HandlerRep();
private final HandlerRep client = new HandlerRep();
private final HashMap<Integer, PlayerColor> cliPlayerColors = new HashMap<Integer, PlayerColor>();
private final HashMap<Integer, PlayerColor> srvPlayerColors = new HashMap<Integer, PlayerColor>();
CableRenderMode crm = CableRenderMode.Standard;
private CableRenderMode crm = CableRenderMode.Standard;
public HashMap<Integer, PlayerColor> getPlayerColors()
{
@@ -108,7 +108,7 @@ public class TickHandler
}
}
HandlerRep getRepo()
private HandlerRep getRepo()
{
if( Platform.isServer() )
{
@@ -306,14 +306,14 @@ public class TickHandler
}
}
static class HandlerRep
private static class HandlerRep
{
public Queue<AEBaseTile> tiles = new LinkedList<AEBaseTile>();
private Queue<AEBaseTile> tiles = new LinkedList<AEBaseTile>();
public Collection<Grid> networks = new NetworkList();
private Collection<Grid> networks = new NetworkList();
public void clear()
private void clear()
{
this.tiles = new LinkedList<AEBaseTile>();
this.networks = new NetworkList();
@@ -324,8 +324,8 @@ public class TickHandler
{
public final AEColor myColor;
protected final int myEntity;
protected int ticksLeft;
private final int myEntity;
private int ticksLeft;
public PlayerColor( final int id, final AEColor col, final int ticks )
{