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 f054bd699b
commit e94a0cfccf
497 changed files with 7865 additions and 6908 deletions
+9 -4
View File
@@ -88,8 +88,8 @@ import com.google.common.collect.Multimap;
public class CraftingGridCache implements ICraftingGrid, ICraftingProviderHelper, ICellProvider, IMEInventoryHandler<IAEStack>
{
public static final ExecutorService CRAFTING_POOL;
static final Comparator<ICraftingPatternDetails> COMPARATOR = new Comparator<ICraftingPatternDetails>()
private static final ExecutorService CRAFTING_POOL;
private static final Comparator<ICraftingPatternDetails> COMPARATOR = new Comparator<ICraftingPatternDetails>()
{
@Override
public int compare( final ICraftingPatternDetails firstDetail, final ICraftingPatternDetails nextDetail )
@@ -122,7 +122,7 @@ public class CraftingGridCache implements ICraftingGrid, ICraftingProviderHelper
private final Set<IAEItemStack> emitableItems = new HashSet<IAEItemStack>();
private final Map<String, CraftingLinkNexus> craftingLinks = new HashMap<String, CraftingLinkNexus>();
private final Multimap<IAEStack, CraftingWatcher> interests = HashMultimap.create();
public final GenericInterestManager<CraftingWatcher> interestManager = new GenericInterestManager<CraftingWatcher>( this.interests );
private final GenericInterestManager<CraftingWatcher> interestManager = new GenericInterestManager<CraftingWatcher>( this.interests );
private IStorageGrid storageGrid;
private IEnergyGrid energyGrid;
private boolean updateList = false;
@@ -615,7 +615,12 @@ public class CraftingGridCache implements ICraftingGrid, ICraftingProviderHelper
return this.craftingCPUClusters.contains( cpu );
}
static class ActiveCpuIterator implements Iterator<ICraftingCPU>
public GenericInterestManager<CraftingWatcher> getInterestManager()
{
return this.interestManager;
}
private static class ActiveCpuIterator implements Iterator<ICraftingCPU>
{
private final Iterator<CraftingCPUCluster> iterator;