private void addToTies ( int id ) { if ( ties . length == numties ) { ties = Arrays . copyOf ( ties , ( ties . length << 1 ) + 1 ) ; // grow. } ties [ numties ] = id ; ++ numties ; }
Ensure the ties array has capacity for at least one more element .