Changed access to use this qualifier

This commit is contained in:
yueh
2014-12-29 15:13:47 +01:00
parent 2a5e57a59b
commit f471513bd0
604 changed files with 11573 additions and 11573 deletions
@@ -30,7 +30,7 @@ public class AdHocChannelUpdater implements IGridConnectionVisitor
final private int usedChannels;
public AdHocChannelUpdater(int used) {
usedChannels = used;
this.usedChannels = used;
}
@Override
@@ -38,7 +38,7 @@ public class AdHocChannelUpdater implements IGridConnectionVisitor
{
GridNode gn = (GridNode) n;
gn.setControllerRoute( null, true );
gn.incrementChannelCount( usedChannels );
gn.incrementChannelCount( this.usedChannels );
gn.finalizeChannels();
return true;
}
@@ -48,7 +48,7 @@ public class AdHocChannelUpdater implements IGridConnectionVisitor
{
GridConnection gc = (GridConnection) gcc;
gc.setControllerRoute( null, true );
gc.incrementChannelCount( usedChannels );
gc.incrementChannelCount( this.usedChannels );
gc.finalizeChannels();
}
}
@@ -38,40 +38,40 @@ public class ControllerValidator implements IGridVisitor
public int found = 0;
public ControllerValidator(int x, int y, int z) {
minX = x;
minY = y;
minZ = z;
maxX = x;
maxY = y;
maxZ = z;
this.minX = x;
this.minY = y;
this.minZ = z;
this.maxX = x;
this.maxY = y;
this.maxZ = z;
}
@Override
public boolean visitNode(IGridNode n)
{
IGridHost host = n.getMachine();
if ( isValid && host instanceof TileController )
if ( this.isValid && host instanceof TileController )
{
TileController c = (TileController) host;
minX = Math.min( c.xCoord, minX );
maxX = Math.max( c.xCoord, maxX );
minY = Math.min( c.yCoord, minY );
maxY = Math.max( c.yCoord, maxY );
minZ = Math.min( c.zCoord, minZ );
maxZ = Math.max( c.zCoord, maxZ );
this.minX = Math.min( c.xCoord, this.minX );
this.maxX = Math.max( c.xCoord, this.maxX );
this.minY = Math.min( c.yCoord, this.minY );
this.maxY = Math.max( c.yCoord, this.maxY );
this.minZ = Math.min( c.zCoord, this.minZ );
this.maxZ = Math.max( c.zCoord, this.maxZ );
if ( maxX - minX < 7 && maxY - minY < 7 && maxZ - minZ < 7 )
if ( this.maxX - this.minX < 7 && this.maxY - this.minY < 7 && this.maxZ - this.minZ < 7 )
{
found++;
this.found++;
return true;
}
isValid = false;
this.isValid = false;
}
else
return false;
return isValid;
return this.isValid;
}
}
@@ -41,8 +41,8 @@ public class PathSegment
this.open = open;
this.semiOpen = semiOpen;
this.closed = closed;
pgc = myPGC;
isDead = false;
this.pgc = myPGC;
this.isDead = false;
}
List<IPathItem> open;
@@ -51,8 +51,8 @@ public class PathSegment
public boolean step()
{
List<IPathItem> oldOpen = open;
open = new LinkedList<IPathItem>();
List<IPathItem> oldOpen = this.open;
this.open = new LinkedList<IPathItem>();
for (IPathItem i : oldOpen)
{
@@ -60,21 +60,21 @@ public class PathSegment
{
EnumSet<GridFlags> flags = pi.getFlags();
if ( !closed.contains( pi ) )
if ( !this.closed.contains( pi ) )
{
pi.setControllerRoute( i, true );
if ( flags.contains( GridFlags.REQUIRE_CHANNEL ) )
{
// close the semi open.
if ( !semiOpen.contains( pi ) )
if ( !this.semiOpen.contains( pi ) )
{
boolean worked;
if ( flags.contains( GridFlags.COMPRESSED_CHANNEL ) )
worked = useDenseChannel( pi );
worked = this.useDenseChannel( pi );
else
worked = useChannel( pi );
worked = this.useChannel( pi );
if ( worked && flags.contains( GridFlags.MULTIBLOCK ) )
{
@@ -83,24 +83,24 @@ public class PathSegment
{
IGridNode otherNodes = oni.next();
if ( otherNodes != pi )
semiOpen.add( (IPathItem) otherNodes );
this.semiOpen.add( (IPathItem) otherNodes );
}
}
}
else
{
pi.incrementChannelCount( 1 ); // give a channel.
semiOpen.remove( pi );
this.semiOpen.remove( pi );
}
}
closed.add( pi );
open.add( pi );
this.closed.add( pi );
this.open.add( pi );
}
}
}
return open.isEmpty();
return this.open.isEmpty();
}
private boolean useChannel(IPathItem start)
@@ -117,12 +117,12 @@ public class PathSegment
pi = start;
while (pi != null)
{
pgc.channelsByBlocks++;
this.pgc.channelsByBlocks++;
pi.incrementChannelCount( 1 );
pi = pi.getControllerRoute();
}
pgc.channelsInUse++;
this.pgc.channelsInUse++;
return true;
}
@@ -140,12 +140,12 @@ public class PathSegment
pi = start;
while (pi != null)
{
pgc.channelsByBlocks++;
this.pgc.channelsByBlocks++;
pi.incrementChannelCount( 1 );
pi = pi.getControllerRoute();
}
pgc.channelsInUse++;
this.pgc.channelsInUse++;
return true;
}