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
@@ -34,11 +34,11 @@ import appeng.me.cache.PathGridCache;
public class PathSegment
{
final PathGridCache pgc;
final Set<IPathItem> semiOpen;
final Set<IPathItem> closed;
public boolean isDead;
List<IPathItem> open;
private final PathGridCache pgc;
private final Set<IPathItem> semiOpen;
private final Set<IPathItem> closed;
private boolean isDead;
private List<IPathItem> open;
public PathSegment( final PathGridCache myPGC, final List<IPathItem> open, final Set<IPathItem> semiOpen, final Set<IPathItem> closed )
{
@@ -46,7 +46,7 @@ public class PathSegment
this.semiOpen = semiOpen;
this.closed = closed;
this.pgc = myPGC;
this.isDead = false;
this.setDead( false );
}
public boolean step()
@@ -125,12 +125,12 @@ public class PathSegment
pi = start;
while( pi != null )
{
this.pgc.channelsByBlocks++;
this.pgc.setChannelsByBlocks( this.pgc.getChannelsByBlocks() + 1 );
pi.incrementChannelCount( 1 );
pi = pi.getControllerRoute();
}
this.pgc.channelsInUse++;
this.pgc.setChannelsInUse( this.pgc.getChannelsInUse() + 1 );
return true;
}
@@ -150,12 +150,22 @@ public class PathSegment
pi = start;
while( pi != null )
{
this.pgc.channelsByBlocks++;
this.pgc.setChannelsByBlocks( this.pgc.getChannelsByBlocks() + 1 );
pi.incrementChannelCount( 1 );
pi = pi.getControllerRoute();
}
this.pgc.channelsInUse++;
this.pgc.setChannelsInUse( this.pgc.getChannelsInUse() + 1 );
return true;
}
public boolean isDead()
{
return this.isDead;
}
public void setDead( final boolean isDead )
{
this.isDead = isDead;
}
}