private void updateAdd()
    {
        if (willAdd)
        {
            for (final Featurable featurable : toAdd)
            {
                featurables.add(featurable);
                for (final HandlerListener listener : listeners)
                {
                    listener.notifyHandlableAdded(featurable);
                }
                if (featurable.hasFeature(Transformable.class))
                {
                    final Transformable transformable = featurable.getFeature(Transformable.class);
                    transformable.teleport(transformable.getX(), transformable.getY());
                }
            }
            toAdd.clear();
            willAdd = false;
        }
    }
private void updateAdd ( ) { if ( willAdd ) { for ( final Featurable featurable : toAdd ) { featurables . add ( featurable ) ; for ( final HandlerListener listener : listeners ) { listener . notifyHandlableAdded ( featurable ) ; } if ( featurable . hasFeature ( Transformable . class ) ) { final Transformable transformable = featurable . getFeature ( Transformable . class ) ; transformable . teleport ( transformable . getX ( ) , transformable . getY ( ) ) ; } } toAdd . clear ( ) ; willAdd = false ; } }
Update the add list. Prepare features, add to main list and notify listeners.