# HG changeset patch # User kazz # Date 1382028921 -32400 # Node ID ba4eea27d70d8be5d610db4ced4b01fac2be408d # Parent 3e0d1ac4f4a816f3bee7b8788eb131a28ec3757f Refactor to change attribute of threshold value to const class field. diff -r 3e0d1ac4f4a8 -r ba4eea27d70d src/alice/test/topology/aquarium/AutoIncrement.java --- a/src/alice/test/topology/aquarium/AutoIncrement.java Fri Oct 18 01:51:15 2013 +0900 +++ b/src/alice/test/topology/aquarium/AutoIncrement.java Fri Oct 18 01:55:21 2013 +0900 @@ -8,7 +8,7 @@ private Receiver position = ids.create(CommandType.PEEK); private Receiver number = ids.create(CommandType.PEEK); - private float min = -1.3f; + private static final float MIN = -1.3f; public AutoIncrement(String key,int index){ this.number.setKey("maxsize"); @@ -20,8 +20,8 @@ float max = this.number.asInteger()*2-1+0.3f; FishPoint fp = this.position.asClass(FishPoint.class); if (fp.getX()+0.01>max){ - fp.setXYZ(min, fp.getY(), fp.getZ()); - } else if (fp.getX()+0.01< min){ + fp.setXYZ(MIN, fp.getY(), fp.getZ()); + } else if (fp.getX() + 0.01 < MIN){ fp.setXYZ(max, fp.getY(), fp.getZ()); } else {