<?php

namespace ArrayType;

use \WsdlToPhp\PackageBase\AbstractStructArrayBase;

/**
 * This class stands for ArrayOfJP_ConceptBreakdown ArrayType
 * @subpackage Arrays
 */
class ArrayOfJP_ConceptBreakdown extends AbstractStructArrayBase
{
    /**
     * The Concept
     * Meta informations extracted from the WSDL
     * - maxOccurs: unbounded
     * - minOccurs: 0
     * @var \StructType\JP_ConceptBreakdown[]
     */
    public $Concept;
    /**
     * Constructor method for ArrayOfJP_ConceptBreakdown
     * @uses ArrayOfJP_ConceptBreakdown::setConcept()
     * @param \StructType\JP_ConceptBreakdown[] $concept
     */
    public function __construct(array $concept = array())
    {
        $this
            ->setConcept($concept);
    }
    /**
     * Get Concept value
     * @return \StructType\JP_ConceptBreakdown[]|null
     */
    public function getConcept()
    {
        return $this->Concept;
    }
    /**
     * Set Concept value
     * @throws \InvalidArgumentException
     * @param \StructType\JP_ConceptBreakdown[] $concept
     * @return \ArrayType\ArrayOfJP_ConceptBreakdown
     */
    public function setConcept(array $concept = array())
    {
        foreach ($concept as $arrayOfJP_ConceptBreakdownConceptItem) {
            // validation for constraint: itemType
            if (!$arrayOfJP_ConceptBreakdownConceptItem instanceof \StructType\JP_ConceptBreakdown) {
                throw new \InvalidArgumentException(sprintf('The Concept property can only contain items of \StructType\JP_ConceptBreakdown, "%s" given', is_object($arrayOfJP_ConceptBreakdownConceptItem) ? get_class($arrayOfJP_ConceptBreakdownConceptItem) : gettype($arrayOfJP_ConceptBreakdownConceptItem)), __LINE__);
            }
        }
        $this->Concept = $concept;
        return $this;
    }
    /**
     * Add item to Concept value
     * @throws \InvalidArgumentException
     * @param \StructType\JP_ConceptBreakdown $item
     * @return \ArrayType\ArrayOfJP_ConceptBreakdown
     */
    public function addToConcept(\StructType\JP_ConceptBreakdown $item)
    {
        // validation for constraint: itemType
        if (!$item instanceof \StructType\JP_ConceptBreakdown) {
            throw new \InvalidArgumentException(sprintf('The Concept property can only contain items of \StructType\JP_ConceptBreakdown, "%s" given', is_object($item) ? get_class($item) : gettype($item)), __LINE__);
        }
        $this->Concept[] = $item;
        return $this;
    }
    /**
     * Returns the current element
     * @see AbstractStructArrayBase::current()
     * @return \StructType\JP_ConceptBreakdown|null
     */
    public function current()
    {
        return parent::current();
    }
    /**
     * Returns the indexed element
     * @see AbstractStructArrayBase::item()
     * @param int $index
     * @return \StructType\JP_ConceptBreakdown|null
     */
    public function item($index)
    {
        return parent::item($index);
    }
    /**
     * Returns the first element
     * @see AbstractStructArrayBase::first()
     * @return \StructType\JP_ConceptBreakdown|null
     */
    public function first()
    {
        return parent::first();
    }
    /**
     * Returns the last element
     * @see AbstractStructArrayBase::last()
     * @return \StructType\JP_ConceptBreakdown|null
     */
    public function last()
    {
        return parent::last();
    }
    /**
     * Returns the element at the offset
     * @see AbstractStructArrayBase::offsetGet()
     * @param int $offset
     * @return \StructType\JP_ConceptBreakdown|null
     */
    public function offsetGet($offset)
    {
        return parent::offsetGet($offset);
    }
    /**
     * Returns the attribute name
     * @see AbstractStructArrayBase::getAttributeName()
     * @return string Concept
     */
    public function getAttributeName()
    {
        return 'Concept';
    }
    /**
     * Method called when an object has been exported with var_export() functions
     * It allows to return an object instantiated with the values
     * @see AbstractStructArrayBase::__set_state()
     * @uses AbstractStructArrayBase::__set_state()
     * @param array $array the exported values
     * @return \ArrayType\ArrayOfJP_ConceptBreakdown
     */
    public static function __set_state(array $array)
    {
        return parent::__set_state($array);
    }
    /**
     * Method returning the class name
     * @return string __CLASS__
     */
    public function __toString()
    {
        return __CLASS__;
    }
}
