Class XmlRightsList
- java.lang.Object
-
- de.ipk_gatersleben.bit.bi.edal.primary_data.reference.datacite.xml.XmlRightsList
-
- All Implemented Interfaces:
java.io.Serializable
public class XmlRightsList extends java.lang.Object implements java.io.Serializable
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description XmlRightsList()
Default constructorXmlRightsList(UntypedData elementValue)
-
Method Summary
Modifier and Type Method Description void
addRights(int index, XmlRights rigths)
void
addRights(XmlRights rights)
java.util.Iterator<? extends XmlRights>
enumerateRights()
Return anIterator
of allXmlRights
.XmlRights[]
getRights()
Returns the contents of the collection in an Array.XmlRights
getRights(int index)
Return theXmlRights
at the specified position in theList
.int
getRightsCount()
Return the number of theXmlRights
.void
removeAllRights()
Remove allXmlRights
in theList
.XmlRights
removeRightAt(int index)
Remove aXmlRights
at the specified position.boolean
removeRights(XmlRights date)
Remove a specifiedXmlRights
.void
setRights(int index, XmlRights rights)
Set theXmlRights
at the specified position of theList
.void
setRights(XmlRights[] rightsArray)
Set a allXmlRights
to theList
.
-
-
-
Constructor Detail
-
XmlRightsList
public XmlRightsList()
Default constructor
-
XmlRightsList
public XmlRightsList(UntypedData elementValue)
-
-
Method Detail
-
addRights
public void addRights(XmlRights rights) throws java.lang.IndexOutOfBoundsException
- Parameters:
rights
- theXmlRights
to add.- Throws:
java.lang.IndexOutOfBoundsException
- if the index given is outside the bounds of the collection.
-
addRights
public void addRights(int index, XmlRights rigths) throws java.lang.IndexOutOfBoundsException
-
enumerateRights
public java.util.Iterator<? extends XmlRights> enumerateRights()
Return anIterator
of allXmlRights
.- Returns:
- an Iterator over all
XmlRights
elements.
-
getRights
public XmlRights getRights(int index) throws java.lang.IndexOutOfBoundsException
Return theXmlRights
at the specified position in theList
.
-
getRights
public XmlRights[] getRights()
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
-
getRightsCount
public int getRightsCount()
Return the number of theXmlRights
.- Returns:
- the size of this collection
-
removeAllRights
public void removeAllRights()
Remove allXmlRights
in theList
.
-
removeRights
public boolean removeRights(XmlRights date)
Remove a specifiedXmlRights
.- Parameters:
date
- theXmlRights
to remove.- Returns:
- true if the object was removed from the collection.
-
removeRightAt
public XmlRights removeRightAt(int index)
Remove aXmlRights
at the specified position.- Parameters:
index
- the position of theXmlRights
to remove.- Returns:
- the element removed from the collection
-
setRights
public void setRights(int index, XmlRights rights) throws java.lang.IndexOutOfBoundsException
Set theXmlRights
at the specified position of theList
.
-
-