Class XmlTitles
- java.lang.Object
-
- de.ipk_gatersleben.bit.bi.edal.primary_data.reference.datacite.xml.XmlTitles
-
- All Implemented Interfaces:
java.io.Serializable
public class XmlTitles extends java.lang.Object implements java.io.Serializable
XML mapping class for the 'titles' element.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description XmlTitles()
Default constructor.
-
Method Summary
Modifier and Type Method Description void
addTitle(int index, XmlTitle title)
void
addTitle(XmlTitle title)
java.util.Iterator<? extends XmlTitle>
enumerateTitle()
Return anIterator
of allXmlTitle
.XmlTitle[]
getTitle()
Returns the contents of the collection in an Array.XmlTitle
getTitle(int index)
Return theXmlTitle
at the specified position in theList
.int
getTitleCount()
Return the number of theXmlTitle
.void
removeAllTitle()
Remove allXmlTitle
in theList
.boolean
removeTitle(XmlTitle title)
Remove a specifiedXmlTitle
.XmlTitle
removeTitleAt(int index)
Remove aXmlTitle
at the specified position.void
setTitle(int index, XmlTitle title)
Set theXmlTitle
at the specified position of theList
.void
setTitle(XmlTitle[] titleArray)
Set a allXmlTitle
to theList
.
-
-
-
Method Detail
-
addTitle
public void addTitle(XmlTitle title) throws java.lang.IndexOutOfBoundsException
- Parameters:
title
- theXmlTitle
to add.- Throws:
java.lang.IndexOutOfBoundsException
- if the index given is outside the bounds of the collection.
-
addTitle
public void addTitle(int index, XmlTitle title) throws java.lang.IndexOutOfBoundsException
-
enumerateTitle
public java.util.Iterator<? extends XmlTitle> enumerateTitle()
Return anIterator
of allXmlTitle
.- Returns:
- an Iterator over all
XmlTitle
elements.
-
getTitle
public XmlTitle getTitle(int index) throws java.lang.IndexOutOfBoundsException
Return theXmlTitle
at the specified position in theList
.
-
getTitle
public XmlTitle[] getTitle()
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
-
getTitleCount
public int getTitleCount()
Return the number of theXmlTitle
.- Returns:
- the size of this collection
-
removeAllTitle
public void removeAllTitle()
Remove allXmlTitle
in theList
.
-
removeTitle
public boolean removeTitle(XmlTitle title)
Remove a specifiedXmlTitle
.- Parameters:
title
- theXmlTitle
to remove.- Returns:
- true if the object was removed from the collection.
-
removeTitleAt
public XmlTitle removeTitleAt(int index)
Remove aXmlTitle
at the specified position.- Parameters:
index
- the position of theXmlTitle
to remove.- Returns:
- the element removed from the collection
-
setTitle
public void setTitle(int index, XmlTitle title) throws java.lang.IndexOutOfBoundsException
Set theXmlTitle
at the specified position of theList
.- Parameters:
title
- the position to set theXmlTitle
.index
- the position to set.- Throws:
java.lang.IndexOutOfBoundsException
- if the index given is outside the bounds of the collection
-
-