question: public void exchange ( int i1 , int i2 ) { if ( i1 == i2 ) { return ; } if ( i1 > - 1 && i2 > - 1 && listOfColors . size ( ) > i1 && listOfColors . size ( ) > i2 ) { ColorRGB c1 = listOfColors . get ( i1 ) ; ColorRGB c2 = listOfColors . get ( i2 ) ; listOfColors . set ( i1 , c2 ) ; listOfColors . set ( i2 , c1 ) ; } fireUpdate ( this ) ; }
target:  Exchanges two colors by index