* @param Object element * @return void */ public function add(common_Object $element) { parent::add($element); } /** * Short description of method union * * @access public * @author Jerome Bogaerts, * @param Collection collection * @return core_kernel_classes_ContainerCollection */ public function union(common_Collection $collection) { $returnValue = null; $returnValue = new core_kernel_classes_ContainerCollection($this); $returnValue->sequence = array_merge($this->sequence, $collection->sequence); return $returnValue; } /** * Short description of method intersect * * @access public * @author Jerome Bogaerts, * @param Collection collection * @return core_kernel_classes_ContainerCollection */ public function intersect(common_Collection $collection) { $returnValue = null; $returnValue = new core_kernel_classes_ContainerCollection(new common_Object(__METHOD__)); $returnValue->sequence = array_uintersect($this->sequence, $collection->sequence, 'core_kernel_classes_ContainerComparator::compare'); return $returnValue; } /** * Short description of method indexOf * * @access public * @author Jerome Bogaerts, * @param Object resource * @return Integer */ public function indexOf(common_Object $resource) { $returnValue = null; $returnValue = -1; foreach ($this->sequence as $index => $_resource) { if ($_resource instanceof core_kernel_classes_Resource) { if ($resource->equals($_resource)) { return $index; } } } return $returnValue; } /** * Short description of method __toString * * @access public * @author Jerome Bogaerts, * @return string */ public function __toString() { $returnValue = (string) ''; $returnValue = 'Collection containning ' . $this->count() . ' elements' ; return (string) $returnValue; } }