Destinia.maps.Composite=function(){Destinia.maps.Component.apply(this,arguments);this._components=[]};Destinia.maps.Composite.prototype=new Destinia.maps.Component();Destinia.maps.Composite.prototype.constructor=Destinia.maps.Composite;Destinia.maps.Composite.prototype.addComponent=function(a){if("object"===typeof a&&a instanceof Destinia.maps.Component){this._components.push(a)}else{throw {type:"InvalidComponent"}}return this};Destinia.maps.Composite.prototype.emptyComponents=function(){this._components=[];return this};Destinia.maps.Composite.prototype.removeComponent=function(){};Destinia.maps.Composite.prototype.getComponent=function(a){return this._components[a]};Destinia.maps.Composite.prototype.getComponents=function(){return this._components};Destinia.maps.Composite.prototype.setComponents=function(b){this._components=[];for(var a=0;a<b.length;a++){this.addComponent(b[a])}return this};Destinia.maps.Composite.prototype.iterate=function(a,b){for(var c=0;c<this._components.length;c++){a(this._components[c],c);if(this._components[c] instanceof Destinia.maps.Composite){this._components[c].iterate(a,c)}}return this};Destinia.maps.Composite.prototype.renderComponents=function(){for(var a=0;a<this._components.length;a++){this._components[a].render()}};Destinia.maps.Composite.prototype.render=function(){this._render();this.renderComponents()};
