public boolean addElement ( P element ) { boolean changed = false ; if ( element != null ) { final GridCellElement < P > gridElement = new GridCellElement <> ( element ) ; for ( final GridCell < P > cell : getGridCellsOn ( element . getGeoLocation ( ) . toBounds2D ( ) , true ) ) { if ( cell . addElement ( gridElement ) ) { changed = true ; } } } if ( changed ) { ++ this . elementCount ; } return changed ; }
Add the element in the grid .