Class XmlGeoLocations
- java.lang.Object
-
- de.ipk_gatersleben.bit.bi.edal.primary_data.reference.datacite.xml.XmlGeoLocations
-
- All Implemented Interfaces:
java.io.Serializable
public class XmlGeoLocations extends java.lang.Object implements java.io.Serializable- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description XmlGeoLocations()
-
Method Summary
Modifier and Type Method Description voidaddGeoLocation(int index, XmlGeoLocation geoLocation)voidaddGeoLocation(XmlGeoLocation geoLocation)java.util.Iterator<? extends XmlGeoLocation>enumerateGeoLocation()Return anIteratorof allXmlGeoLocation.XmlGeoLocation[]getgeoLocation()Returns the contents of the collection in an Array.XmlGeoLocationgetGeoLocation(int index)Return theXmlGeoLocationat the specified position in theList.intgetGeoLocationCount()Return the number of theXmlGeoLocation.voidremoveAllGeoLocation()Remove allXmlGeoLocationin theList.booleanremoveGeoLocation(XmlGeoLocation geoLocation)Remove a specifiedXmlGeoLocation.XmlGeoLocationremoveGeoLocationAt(int index)Remove aXmlGeoLocationat the specified position.voidsetGeoLocation(int index, XmlGeoLocation geoLocation)Set theXmlGeoLocationat the specified position of theList.voidsetGeoLocation(XmlGeoLocation[] geoLocationArray)Set a allXmlGeoLocationto theList.
-
-
-
Method Detail
-
addGeoLocation
public void addGeoLocation(XmlGeoLocation geoLocation) throws java.lang.IndexOutOfBoundsException
- Parameters:
geoLocation- theXmlGeoLocationto add.- Throws:
java.lang.IndexOutOfBoundsException- if the index given is outside the bounds of the collection.
-
addGeoLocation
public void addGeoLocation(int index, XmlGeoLocation geoLocation) throws java.lang.IndexOutOfBoundsException- Parameters:
index- the position to insert theXmlGeoLocation.geoLocation- theXmlGeoLocationto add.- Throws:
java.lang.IndexOutOfBoundsException- if the index given is outside the bounds of the collection
-
enumerateGeoLocation
public java.util.Iterator<? extends XmlGeoLocation> enumerateGeoLocation()
Return anIteratorof allXmlGeoLocation.- Returns:
- an Iterator over all
XmlGeoLocationelements.
-
getGeoLocation
public XmlGeoLocation getGeoLocation(int index) throws java.lang.IndexOutOfBoundsException
Return theXmlGeoLocationat the specified position in theList.- Parameters:
index- the position of the searchedXmlGeoLocation.- Returns:
- the value of the
XmlGeoLocationat the given index - Throws:
java.lang.IndexOutOfBoundsException- if the index given is outside the bounds of the collection
-
getgeoLocation
public XmlGeoLocation[] getgeoLocation()
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
-
getGeoLocationCount
public int getGeoLocationCount()
Return the number of theXmlGeoLocation.- Returns:
- the size of this collection
-
removeAllGeoLocation
public void removeAllGeoLocation()
Remove allXmlGeoLocationin theList.
-
removeGeoLocation
public boolean removeGeoLocation(XmlGeoLocation geoLocation)
Remove a specifiedXmlGeoLocation.- Parameters:
geoLocation- theXmlGeoLocationto remove.- Returns:
- true if the object was removed from the collection.
-
removeGeoLocationAt
public XmlGeoLocation removeGeoLocationAt(int index)
Remove aXmlGeoLocationat the specified position.- Parameters:
index- the position of theXmlGeoLocationto remove.- Returns:
- the element removed from the collection
-
setGeoLocation
public void setGeoLocation(int index, XmlGeoLocation geoLocation) throws java.lang.IndexOutOfBoundsExceptionSet theXmlGeoLocationat the specified position of theList.- Parameters:
index- the position to set theXmlGeoLocation.geoLocation- theXmlGeoLocationto set.- Throws:
java.lang.IndexOutOfBoundsException- if the index given is outside the bounds of the collection
-
setGeoLocation
public void setGeoLocation(XmlGeoLocation[] geoLocationArray)
Set a allXmlGeoLocationto theList.- Parameters:
geoLocationArray- the array of geolocations to set
-
-