customxmlpartcollection-ag凯发旗舰厅



com.spire.doc.documents.markup
class customxmlpartcollection

java.lang.object
  extended by com.spire.doc.documents.markup.customxmlpartcollection
all implemented interfaces:
java.lang.iterable

public class customxmlpartcollection
extends java.lang.object
implements java.lang.iterable

represents a collection of custom xml parts. the items are objects. you do not normally need to create instances of this class. you can access custom xml data stored in a document via the document.getcustomxmlparts() property. see also customxmlpart. see also document.getcustomxmlparts()


constructor summary
customxmlpartcollection(document doc)
          initializes an instance of this class.
 
method summary
 void add(customxmlpart part)
          adds an item to the collection.
 void clear()
          removes all elements from the collection.
 customxmlpartcollection deepclone()
          makes a deep copy of this collection and its items.
 customxmlpart get(int index)
          gets an item at the specified index.
 customxmlpart getbyid(java.lang.string id)
          finds and returns a custom xml part by its identifier.
 int getcount()
          gets the number of elements contained in the collection.
 java.util.iterator iterator()
          returns an iterator object that can be used to iterate over all items in the collection.
 void removeat(int index)
          removes an item at the specified index.
 void set(int index, customxmlpart value)
          sets an item at the specified index.
 
constructor detail

customxmlpartcollection

public customxmlpartcollection(document doc)
initializes an instance of this class.
parameters:
doc - document
method detail

getcount

public int getcount()
gets the number of elements contained in the collection.
returns:
int

get

public customxmlpart get(int index)
gets an item at the specified index.
parameters:
index - zero-based index of the item.
returns:
customxmlpart

set

public void set(int index,
                customxmlpart value)
sets an item at the specified index.
parameters:
index - zero-based index of the item.
value - customxmlpart

iterator

public java.util.iterator iterator()
returns an iterator object that can be used to iterate over all items in the collection.
returns:
iterator

add

public void add(customxmlpart part)
adds an item to the collection.
parameters:
part - the custom xml part to add.

removeat

public void removeat(int index)
removes an item at the specified index.
parameters:
index - the zero based index.

clear

public void clear()
removes all elements from the collection.

getbyid

public customxmlpart getbyid(java.lang.string id)
finds and returns a custom xml part by its identifier.
parameters:
id - case-sensitive string that identifies the custom xml part.
returns:
returns null if a custom xml part with the specified identifier is not found.

deepclone

public customxmlpartcollection deepclone()
makes a deep copy of this collection and its items.
returns:
customxmlpartcollection


网站地图