Class XmlDates
- java.lang.Object
-
- de.ipk_gatersleben.bit.bi.edal.primary_data.reference.datacite.xml.XmlDates
-
- All Implemented Interfaces:
java.io.Serializable
public class XmlDates extends java.lang.Object implements java.io.Serializable
XML mapping class for the 'dates' element.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description XmlDates()
Default constructorXmlDates(DateEvents elementValue)
-
Method Summary
Modifier and Type Method Description void
addDate(int index, XmlDate date)
void
addDate(XmlDate date)
java.util.Iterator<? extends XmlDate>
enumerateDate()
Return anIterator
of allXmlDate
.XmlDate[]
getDate()
Returns the contents of the collection in an Array.XmlDate
getDate(int index)
Return theXmlDate
at the specified position in theList
.int
getDateCount()
Return the number of theXmlDate
.void
removeAllDate()
Remove allXmlDate
in theList
.boolean
removeDate(XmlDate date)
Remove a specifiedXmlDate
.XmlDate
removeDateAt(int index)
Remove aXmlDate
at the specified position.void
setDate(int index, XmlDate date)
Set theXmlDate
at the specified position of theList
.void
setDate(XmlDate[] dateArray)
Set a allXmlDate
to theList
.
-
-
-
Constructor Detail
-
XmlDates
public XmlDates()
Default constructor
-
XmlDates
public XmlDates(DateEvents elementValue)
-
-
Method Detail
-
addDate
public void addDate(XmlDate date) throws java.lang.IndexOutOfBoundsException
- Parameters:
date
- theXmlDate
to add.- Throws:
java.lang.IndexOutOfBoundsException
- if the index given is outside the bounds of the collection.
-
addDate
public void addDate(int index, XmlDate date) throws java.lang.IndexOutOfBoundsException
-
enumerateDate
public java.util.Iterator<? extends XmlDate> enumerateDate()
Return anIterator
of allXmlDate
.- Returns:
- an Iterator over all
XmlDate
elements.
-
getDate
public XmlDate getDate(int index) throws java.lang.IndexOutOfBoundsException
Return theXmlDate
at the specified position in theList
.
-
getDate
public XmlDate[] getDate()
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
-
getDateCount
public int getDateCount()
Return the number of theXmlDate
.- Returns:
- the size of this collection
-
removeAllDate
public void removeAllDate()
Remove allXmlDate
in theList
.
-
removeDate
public boolean removeDate(XmlDate date)
Remove a specifiedXmlDate
.- Parameters:
date
- theXmlDate
to remove.- Returns:
- true if the object was removed from the collection.
-
removeDateAt
public XmlDate removeDateAt(int index)
Remove aXmlDate
at the specified position.- Parameters:
index
- the position of theXmlDate
to remove.- Returns:
- the element removed from the collection
-
setDate
public void setDate(int index, XmlDate date) throws java.lang.IndexOutOfBoundsException
Set theXmlDate
at the specified position of theList
.
-
-