Class XmlSubjects

  • All Implemented Interfaces:
    java.io.Serializable

    public class XmlSubjects
    extends java.lang.Object
    implements java.io.Serializable
    XML mapping class for the 'subjects' element.
    See Also:
    Serialized Form
    • Constructor Detail

      • XmlSubjects

        public XmlSubjects()
        Default constructor.
    • Method Detail

      • addSubject

        public void addSubject​(XmlSubject subject)
                        throws java.lang.IndexOutOfBoundsException
        Add a XmlSubject to the List of XmlSubject.
        Parameters:
        subject - the XmlSubject to add.
        Throws:
        java.lang.IndexOutOfBoundsException - if the index given is outside the bounds of the collection.
      • addSubject

        public void addSubject​(int index,
                               XmlSubject subject)
                        throws java.lang.IndexOutOfBoundsException
        Add a XmlSubject to the List of XmlSubject at a specified position.
        Parameters:
        subject - the position to insert the XmlSubject.
        index - the position of the XmlSubject to add.
        Throws:
        java.lang.IndexOutOfBoundsException - if the index given is outside the bounds of the collection
      • enumerateSubject

        public java.util.Iterator<? extends XmlSubject> enumerateSubject()
        Return an Iterator of all XmlSubject.
        Returns:
        an Iterator over all XmlSubject elements.
      • getSubject

        public XmlSubject getSubject​(int index)
                              throws java.lang.IndexOutOfBoundsException
        Return the XmlSubject at the specified position in the List.
        Parameters:
        index - the position of the searched XmlSubject.
        Returns:
        the value of the XmlSubject at the given index
        Throws:
        java.lang.IndexOutOfBoundsException - if the index given is outside the bounds of the collection
      • getSubject

        public XmlSubject[] getSubject()
        Returns the contents of the collection in an Array.

        Note: Just in case the collection contents are changing in another thread, we pass a 0-length Array of the correct type into the API call. This way we know that the Array returned is of exactly the correct length.

        Returns:
        this collection as an Array
      • getSubjectCount

        public int getSubjectCount()
        Return the number of the XmlSubject.
        Returns:
        the size of this collection
      • removeAllSubject

        public void removeAllSubject()
        Remove all XmlSubject in the List.
      • removeSubject

        public boolean removeSubject​(XmlSubject subject)
        Remove a specified XmlSubject.
        Parameters:
        subject - the XmlSubject to remove.
        Returns:
        true if the object was removed from the collection.
      • removeSubjectAt

        public XmlSubject removeSubjectAt​(int index)
        Remove a XmlSubject at the specified position.
        Parameters:
        index - the position of the XmlSubject to remove.
        Returns:
        the element removed from the collection
      • setSubject

        public void setSubject​(int index,
                               XmlSubject subject)
                        throws java.lang.IndexOutOfBoundsException
        Set the XmlSubject at the specified position of the List.
        Parameters:
        index - the position to set the XmlSubject.
        subject - the XmlSubject to set.
        Throws:
        java.lang.IndexOutOfBoundsException - if the index given is outside the bounds of the collection
      • setSubject

        public void setSubject​(XmlSubject[] subjectArray)
        Set a all XmlSubject to the List.
        Parameters:
        subjectArray - the array of subjects to set