public class XmlSizes
extends java.lang.Object
implements java.io.Serializable
| Constructor and Description |
|---|
XmlSizes() |
| Modifier and Type | Method and Description |
|---|---|
void |
addSize(int index,
java.lang.String size)
Add a size to the
List of size at a specified position. |
void |
addSize(long bytes)
Add a size to the
List of sizes. |
void |
addSize(java.lang.String size)
Add a size to the
List of sizes. |
java.util.Iterator<? extends java.lang.String> |
enumerateSize()
Return an
Iterator of all sizes. |
java.lang.String[] |
getSize()
Returns the contents of the collection in an Array.
|
java.lang.String |
getSize(int index)
Return the size at the specified position in the
List. |
int |
getSizeCount()
Return the number of the sizes.
|
void |
removeAllSize()
Remove all sizes in the
List. |
boolean |
removeSize(java.lang.String size)
Remove a specified size.
|
java.lang.String |
removeSizeAt(int index)
Remove a size at the specified position.
|
void |
setSize(int index,
java.lang.String size)
Set the size at the specified position of the
List. |
void |
setSize(java.lang.String[] sizeArray)
Set a all sizes to the
List. |
public void addSize(long bytes)
throws java.lang.IndexOutOfBoundsException
List of sizes.bytes - the number of bytes to convert into a String.java.lang.IndexOutOfBoundsException - if the index given is outside the bounds of the collection.public void addSize(java.lang.String size)
throws java.lang.IndexOutOfBoundsException
List of sizes.size - the size to add.java.lang.IndexOutOfBoundsException - if the index given is outside the bounds of the collection.public void addSize(int index,
java.lang.String size)
throws java.lang.IndexOutOfBoundsException
List of size at a specified position.index - the position to insert the size.size - the size to add.java.lang.IndexOutOfBoundsException - if the index given is outside the bounds of the collectionpublic java.util.Iterator<? extends java.lang.String> enumerateSize()
Iterator of all sizes.public java.lang.String getSize(int index)
throws java.lang.IndexOutOfBoundsException
List.index - the position of the searched size.java.lang.IndexOutOfBoundsException - if the index given is outside the bounds of the collectionpublic java.lang.String[] getSize()
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.
public int getSizeCount()
public void removeAllSize()
List.public boolean removeSize(java.lang.String size)
size - the size to remove.public java.lang.String removeSizeAt(int index)
index - the position of the size to remove.public void setSize(int index,
java.lang.String size)
throws java.lang.IndexOutOfBoundsException
List.index - the position to set the size.size - the size to set.java.lang.IndexOutOfBoundsException - if the index given is outside the bounds of the collectionpublic void setSize(java.lang.String[] sizeArray)
List.sizeArray - teh array of sizes to set