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 at the specified index.Gets the 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 at the specified index.Gets the at the specified index.

Parameters:
index -
Returns:

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:

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:

indexOf

public int indexOf(IDocumentObject entity)
Returns the zero-based index of the specified entity.

Parameters:
entity - the document object.
Returns:

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.