
package cz.moneta.test.dsl.cebia.serialization.arrays;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import jakarta.xml.bind.annotation.XmlAccessType;
import jakarta.xml.bind.annotation.XmlAccessorType;
import jakarta.xml.bind.annotation.XmlType;


/**
 * <p>Java class for ArrayOfdecimal complex type.
 * 
 * <p>The following schema fragment specifies the expected content contained within this class.
 * 
 * <pre>
 * &lt;complexType name="ArrayOfdecimal"&gt;
 *   &lt;complexContent&gt;
 *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
 *       &lt;sequence&gt;
 *         &lt;element name="decimal" type="{http://www.w3.org/2001/XMLSchema}decimal" maxOccurs="unbounded" minOccurs="0"/&gt;
 *       &lt;/sequence&gt;
 *     &lt;/restriction&gt;
 *   &lt;/complexContent&gt;
 * &lt;/complexType&gt;
 * </pre>
 * 
 * 
 */
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "ArrayOfdecimal", propOrder = {
    "decimal"
})
public class ArrayOfdecimal {

    protected List<BigDecimal> decimal;

    /**
     * Gets the value of the decimal property.
     * 
     * <p>
     * This accessor method returns a reference to the live list,
     * not a snapshot. Therefore any modification you make to the
     * returned list will be present inside the JAXB object.
     * This is why there is not a <CODE>set</CODE> method for the decimal property.
     * 
     * <p>
     * For example, to add a new item, do as follows:
     * <pre>
     *    getDecimal().add(newItem);
     * </pre>
     * 
     * 
     * <p>
     * Objects of the following type(s) are allowed in the list
     * {@link BigDecimal }
     * 
     * 
     */
    public List<BigDecimal> getDecimal() {
        if (decimal == null) {
            decimal = new ArrayList<BigDecimal>();
        }
        return this.decimal;
    }

    public ArrayOfdecimal withDecimal(BigDecimal... values) {
        if (values!= null) {
            for (BigDecimal value: values) {
                getDecimal().add(value);
            }
        }
        return this;
    }

    public ArrayOfdecimal withDecimal(Collection<BigDecimal> values) {
        if (values!= null) {
            getDecimal().addAll(values);
        }
        return this;
    }

}
