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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddRights(int index, XmlRights rigths)voidaddRights(XmlRights rights)java.util.Iterator<? extends XmlRights>enumerateRights()Return anIteratorof allXmlRights.XmlRights[]getRights()Returns the contents of the collection in an Array.XmlRightsgetRights(int index)Return theXmlRightsat the specified position in theList.intgetRightsCount()Return the number of theXmlRights.voidremoveAllRights()Remove allXmlRightsin theList.XmlRightsremoveRightAt(int index)Remove aXmlRightsat the specified position.booleanremoveRights(XmlRights date)Remove a specifiedXmlRights.voidsetRights(int index, XmlRights rights)Set theXmlRightsat the specified position of theList.voidsetRights(XmlRights[] rightsArray)Set a allXmlRightsto 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- theXmlRightsto 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 anIteratorof allXmlRights.- Returns:
- an Iterator over all
XmlRightselements.
-
getRights
public XmlRights getRights(int index) throws java.lang.IndexOutOfBoundsException
Return theXmlRightsat 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 allXmlRightsin theList.
-
removeRights
public boolean removeRights(XmlRights date)
Remove a specifiedXmlRights.- Parameters:
date- theXmlRightsto remove.- Returns:
- true if the object was removed from the collection.
-
removeRightAt
public XmlRights removeRightAt(int index)
Remove aXmlRightsat the specified position.- Parameters:
index- the position of theXmlRightsto remove.- Returns:
- the element removed from the collection
-
setRights
public void setRights(int index, XmlRights rights) throws java.lang.IndexOutOfBoundsExceptionSet theXmlRightsat the specified position of theList.
-
-