final variables and parameters

This commit is contained in:
thatsIch
2015-09-30 14:24:40 +02:00
parent 059523f543
commit 8b3a954f73
732 changed files with 9253 additions and 9256 deletions
@@ -31,15 +31,15 @@ public class AdHocChannelUpdater implements IGridConnectionVisitor
private final int usedChannels;
public AdHocChannelUpdater( int used )
public AdHocChannelUpdater( final int used )
{
this.usedChannels = used;
}
@Override
public boolean visitNode( IGridNode n )
public boolean visitNode( final IGridNode n )
{
GridNode gn = (GridNode) n;
final GridNode gn = (GridNode) n;
gn.setControllerRoute( null, true );
gn.incrementChannelCount( this.usedChannels );
gn.finalizeChannels();
@@ -47,9 +47,9 @@ public class AdHocChannelUpdater implements IGridConnectionVisitor
}
@Override
public void visitConnection( IGridConnection gcc )
public void visitConnection( final IGridConnection gcc )
{
GridConnection gc = (GridConnection) gcc;
final GridConnection gc = (GridConnection) gcc;
gc.setControllerRoute( null, true );
gc.incrementChannelCount( this.usedChannels );
gc.finalizeChannels();
@@ -30,17 +30,17 @@ public class ControllerChannelUpdater implements IGridConnectionVisitor
{
@Override
public boolean visitNode( IGridNode n )
public boolean visitNode( final IGridNode n )
{
GridNode gn = (GridNode) n;
final GridNode gn = (GridNode) n;
gn.finalizeChannels();
return true;
}
@Override
public void visitConnection( IGridConnection gcc )
public void visitConnection( final IGridConnection gcc )
{
GridConnection gc = (GridConnection) gcc;
final GridConnection gc = (GridConnection) gcc;
gc.finalizeChannels();
}
}
@@ -38,7 +38,7 @@ public class ControllerValidator implements IGridVisitor
int maxY;
int maxZ;
public ControllerValidator( int x, int y, int z )
public ControllerValidator( final int x, final int y, final int z )
{
this.minX = x;
this.maxX = x;
@@ -49,14 +49,14 @@ public class ControllerValidator implements IGridVisitor
}
@Override
public boolean visitNode( IGridNode n )
public boolean visitNode( final IGridNode n )
{
IGridHost host = n.getMachine();
final IGridHost host = n.getMachine();
if( this.isValid && host instanceof TileController )
{
TileController c = (TileController) host;
final TileController c = (TileController) host;
BlockPos pos = c.getPos();
final BlockPos pos = c.getPos();
this.minX = Math.min( pos.getX(), this.minX );
this.maxX = Math.max( pos.getX(), this.maxX );
@@ -40,7 +40,7 @@ public class PathSegment
public boolean isDead;
List<IPathItem> open;
public PathSegment( PathGridCache myPGC, List<IPathItem> open, Set<IPathItem> semiOpen, Set<IPathItem> closed )
public PathSegment( final PathGridCache myPGC, final List<IPathItem> open, final Set<IPathItem> semiOpen, final Set<IPathItem> closed )
{
this.open = open;
this.semiOpen = semiOpen;
@@ -51,14 +51,14 @@ public class PathSegment
public boolean step()
{
List<IPathItem> oldOpen = this.open;
final List<IPathItem> oldOpen = this.open;
this.open = new LinkedList<IPathItem>();
for( IPathItem i : oldOpen )
for( final IPathItem i : oldOpen )
{
for( IPathItem pi : i.getPossibleOptions() )
for( final IPathItem pi : i.getPossibleOptions() )
{
EnumSet<GridFlags> flags = pi.getFlags();
final EnumSet<GridFlags> flags = pi.getFlags();
if( !this.closed.contains( pi ) )
{
@@ -69,7 +69,7 @@ public class PathSegment
// close the semi open.
if( !this.semiOpen.contains( pi ) )
{
boolean worked;
final boolean worked;
if( flags.contains( GridFlags.COMPRESSED_CHANNEL ) )
{
@@ -82,10 +82,10 @@ public class PathSegment
if( worked && flags.contains( GridFlags.MULTIBLOCK ) )
{
Iterator<IGridNode> oni = ( (IGridMultiblock) ( (IGridNode) pi ).getGridBlock() ).getMultiblockNodes();
final Iterator<IGridNode> oni = ( (IGridMultiblock) ( (IGridNode) pi ).getGridBlock() ).getMultiblockNodes();
while( oni.hasNext() )
{
IGridNode otherNodes = oni.next();
final IGridNode otherNodes = oni.next();
if( otherNodes != pi )
{
this.semiOpen.add( (IPathItem) otherNodes );
@@ -109,7 +109,7 @@ public class PathSegment
return this.open.isEmpty();
}
private boolean useDenseChannel( IPathItem start )
private boolean useDenseChannel( final IPathItem start )
{
IPathItem pi = start;
while( pi != null )
@@ -134,7 +134,7 @@ public class PathSegment
return true;
}
private boolean useChannel( IPathItem start )
private boolean useChannel( final IPathItem start )
{
IPathItem pi = start;
while( pi != null )