All Downloads are FREE. Search and download functionalities are using the official Maven repository.

oasis.names.specification.ubl.schema.xsd.commonextensioncomponents_2.UBLExtensionsType Maven / Gradle / Ivy


package oasis.names.specification.ubl.schema.xsd.commonextensioncomponents_2;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import javax.annotation.Nonnegative;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
import com.phloc.commons.annotations.ReturnsMutableObject;
import com.phloc.commons.equals.EqualsUtils;
import com.phloc.commons.hash.HashCodeGenerator;
import com.phloc.commons.string.ToStringGenerator;


/**
 * 
 *         A container for all extensions present in the document.
 *       
 * 
 * 

Java class for UBLExtensionsType complex type. * *

The following schema fragment specifies the expected content contained within this class. * *

 * <complexType name="UBLExtensionsType">
 *   <complexContent>
 *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
 *       <sequence>
 *         <element ref="{urn:oasis:names:specification:ubl:schema:xsd:CommonExtensionComponents-2}UBLExtension" maxOccurs="unbounded"/>
 *       </sequence>
 *     </restriction>
 *   </complexContent>
 * </complexType>
 * 
* * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "UBLExtensionsType", propOrder = { "ublExtension" }) public class UBLExtensionsType implements Serializable { @XmlElement(name = "UBLExtension", required = true) private List ublExtension; /** * Default constructor * Created by phloc-ubl-jaxb-plugin -Xphloc-ubl-value * */ public UBLExtensionsType() { } /** * * A single extension for private use. * Gets the value of the ublExtension property. * *

* 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 set method for the ublExtension property. * *

* For example, to add a new item, do as follows: *

     *    getUBLExtension().add(newItem);
     * 
* * *

* Objects of the following type(s) are allowed in the list * {@link UBLExtensionType } * * */ @Nonnull @ReturnsMutableObject(reason = "JAXB implementation style") public List getUBLExtension() { if (ublExtension == null) { ublExtension = new ArrayList(); } return this.ublExtension; } /** * Created by phloc-jaxb22-plugin -Xphloc-equalshashcode * */ @Override public boolean equals(final Object o) { if (o == this) { return true; } if ((o == null)||(!getClass().equals(o.getClass()))) { return false; } final UBLExtensionsType rhs = ((UBLExtensionsType) o); if (!EqualsUtils.equals(ublExtension, rhs.ublExtension)) { return false; } return true; } /** * Created by phloc-jaxb22-plugin -Xphloc-equalshashcode * */ @Override public int hashCode() { return new HashCodeGenerator(this).append(ublExtension).getHashCode(); } /** * Created by phloc-jaxb22-plugin -Xphloc-tostring * */ @Override public String toString() { return new ToStringGenerator(this).append("ublExtension", ublExtension).toString(); } /** * Created by phloc-jaxb22-plugin -Xphloc-list-extension * * @param aList * The new list member to set. May be null. */ public void setUblExtension( @Nullable final List aList) { ublExtension = aList; } /** * Created by phloc-jaxb22-plugin -Xphloc-list-extension * * @return * true if at least one item is contained, false otherwise. */ public boolean hasUBLExtensionEntries() { return (!getUBLExtension().isEmpty()); } /** * Created by phloc-jaxb22-plugin -Xphloc-list-extension * * @return * true if no item is contained, false otherwise. */ public boolean hasNoUBLExtensionEntries() { return getUBLExtension().isEmpty(); } /** * Created by phloc-jaxb22-plugin -Xphloc-list-extension * * @return * The number of contained elements. Always ≥ 0. */ @Nonnegative public int getUBLExtensionCount() { return getUBLExtension().size(); } /** * Created by phloc-jaxb22-plugin -Xphloc-list-extension * * @param index * The index to retrieve * @return * The element at the specified index. May be null * @throws ArrayIndexOutOfBoundsException * if the index is invalid! */ @Nullable public UBLExtensionType getUBLExtensionAtIndex( @Nonnegative final int index) { return getUBLExtension().get(index); } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy