documentobjectcollection-ag凯发旗舰厅



com.spire.doc.collections
class documentobjectcollection

java.lang.object
  extended by com.spire.doc.ownerholder
      extended by com.spire.doc.collections.collectionex
          extended by com.spire.doc.documents.xml.documentserializablecollection
              extended by com.spire.doc.collections.documentobjectcollection
all implemented interfaces:
icollectionbase, idocumentobjectcollection, ixdlsserializablecollection, java.lang.iterable
direct known subclasses:
bodyregioncollection, cellcollection, paragraphitemcollection, rowcollection, sectioncollection, shapeitemcollection, textboxitemcollection

public abstract class documentobjectcollection
extends documentserializablecollection
implements idocumentobjectcollection

represents a collection of dls entities.


method summary
 int add(idocumentobject entity)
          adds the specified entity.
 void clear()
          removes all items
 boolean contains(idocumentobject entity)
          determines whether a entity is in the collection.
 documentobject get(int index)
          gets the documentobject at the specified index.
 documentobject getfirstitem()
          gets the first item.
 documentobject getlastitem()
          gets the last item.
 int indexof(idocumentobject entity)
          returns the zero-based index of the specified entity.
 void insert(int index, idocumentobject entity)
          inserts a entity into the collection at the specified index.
 void remove(idocumentobject entity)
          removes the document object from the collection.
 void removeat(int index)
          removes the document object at the specified index from the collection.
 
methods inherited from class com.spire.doc.collections.collectionex
getcount, iterator
 
methods inherited from class com.spire.doc.ownerholder
getdocument
 
methods inherited from interface com.spire.doc.interfaces.icollectionbase
getcount
 
methods inherited from interface com.spire.doc.interfaces.ixdlsserializablecollection
addnewitem, getcount, gettagitemnameex
 
method detail

get

public documentobject get(int index)
gets the documentobject at the specified index.
specified by:
get in interface idocumentobjectcollection
parameters:
index - the specified index
returns:
the document object

getfirstitem

public documentobject getfirstitem()
gets the first item.
returns:
the first item.

getlastitem

public documentobject getlastitem()
gets the last item.
returns:
the last item.

add

public int add(idocumentobject entity)
adds the specified entity.
parameters:
entity - the document object.
returns:
int value

clear

public void clear()
removes all items
overrides:
clear in class collectionex

contains

public boolean contains(idocumentobject entity)
determines whether a entity is in the collection.
parameters:
entity - the document object.
returns:
if this collection has the entity then return true,otherwise return false

indexof

public int indexof(idocumentobject entity)
returns the zero-based index of the specified entity.
parameters:
entity - the document object.
returns:
return index of this entity in this collection

insert

public void insert(int index,
                   idocumentobject entity)
inserts a entity into the collection at the specified index.
parameters:
index - the index.
entity - the document object.

remove

public void remove(idocumentobject entity)
removes the document object from the collection.
parameters:
entity - the document object.

removeat

public void removeat(int index)
removes the document object at the specified index from the collection.
parameters:
index - the index.


网站地图