public void addToCell ( int index , int element ) { if ( cells . size ( ) < index + 1 ) { addSingletonCell ( element ) ; } else { cells . get ( index ) . add ( element ) ; } }
Add an element to a particular cell .