@@ -40,7 +40,7 @@ final class VisualSortArray extends AbstractSortArray {
4040 private boolean isInitialized = false ;
4141
4242 // Visual state per element: 0=active, 1=inactive, 2=comparing, 3=done
43- private int [] state ;
43+ private int [] states ;
4444
4545 private volatile boolean isDone ;
4646
@@ -68,7 +68,7 @@ public VisualSortArray(int size, double speed) {
6868 throw new IllegalArgumentException ();
6969 stepsPerSecond = speed ;
7070 stepsPerCheck = (int )Math .max (Math .min (stepsPerSecond * CHECK_INTERVAL_NS / 1e9 , 1_000_000 ), 1 );
71- state = new int [size ];
71+ states = new int [size ];
7272 }
7373
7474
@@ -124,13 +124,13 @@ public void swap(int i, int j) {
124124
125125 public void setElement (int index , ElementState state ) {
126126 Objects .requireNonNull (state );
127- this .state [index ] = state .ordinal ();
127+ this .states [index ] = state .ordinal ();
128128 }
129129
130130
131131 public void setRange (int start , int end , ElementState state ) {
132132 Objects .requireNonNull (state );
133- Arrays .fill (this . state , start , end , state .ordinal ());
133+ Arrays .fill (states , start , end , state .ordinal ());
134134 }
135135
136136
@@ -140,7 +140,7 @@ public int getValue(int index) {
140140
141141
142142 public int getState (int index ) {
143- return state [index ];
143+ return states [index ];
144144 }
145145
146146
0 commit comments