public void swap(int i,int j){
  Instance in=m_Instances.get(i);
  m_Instances.set(i,m_Instances.get(j));
  m_Instances.set(j,in);
}

public void swap ( int i , int j ) { Instance in = m_Instances . get ( i ) ; m_Instances . set ( i , m_Instances . get ( j ) ) ; m_Instances . set ( j , in ) ; }
swaps two instances in the set .
