com.aspose.cells
Class DocumentPropertyCollection

java.lang.Object
  extended by CollectionBase
      extended by com.aspose.cells.DocumentPropertyCollection
All Implemented Interfaces:
java.lang.Iterable
Direct Known Subclasses:
BuiltInDocumentPropertyCollection, CustomDocumentPropertyCollection

public abstract class DocumentPropertyCollection 
extends CollectionBase

Base class for BuiltInDocumentPropertyCollection and CustomDocumentPropertyCollection collections.

Example:

//Instantiate a Workbook object by calling its empty constructor
Workbook workbook = new Workbook("book1.xls");
 
//Retrieve a list of all custom document properties of the Excel file
DocumentPropertyCollection customProperties = workbook.getWorksheets().getCustomDocumentProperties();
 
//Accessng a custom document property by using the property index
DocumentProperty customProperty1 = customProperties.get(3);
 
//Accessng a custom document property by using the property name
DocumentProperty customProperty2 = customProperties.get("Owner");


Property Getters/Setters Summary
intgetCount()→ inherited from com.aspose.cells.CollectionBase
          
DocumentPropertyget(int)
           Returns a DocumentProperty object by index.
DocumentPropertyget(java.lang.String)
           Returns a DocumentProperty object by the name of the property.
 
Method Summary
intadd(java.lang.Object value)→ inherited from com.aspose.cells.CollectionBase
          Reserved for internal use.
voidclear()→ inherited from com.aspose.cells.CollectionBase
          
booleancontains(java.lang.Object value)→ inherited from com.aspose.cells.CollectionBase
          Reserved for internal use.
booleancontains(java.lang.String name)
           Returns true if a property with the specified name exists in the collection.
intindexOf(java.lang.Object value)→ inherited from com.aspose.cells.CollectionBase
          Reserved for internal use.
intindexOf(java.lang.String name)
           Gets the index of a property by name.
java.util.Iteratoriterator()→ inherited from com.aspose.cells.CollectionBase
          
voidremove(java.lang.String name)
           Removes a property with the specified name from the collection.
voidremoveAt(int index)
           Removes a property at the specified index.
 

Property Getters/Setters Detail

getCount

→ inherited from com.aspose.cells.CollectionBase
public int getCount()

get

public DocumentProperty get(java.lang.String name)
Returns a DocumentProperty object by the name of the property.

Returns null if a property with the specified name is not found.

Parameters:
name - The case-insensitive name of the property to retrieve.

get

public DocumentProperty get(int index)
Returns a DocumentProperty object by index.
Parameters:
index - Zero-based index of the DocumentProperty to retrieve.

Method Detail

contains

public boolean contains(java.lang.String name)
Returns true if a property with the specified name exists in the collection.
Parameters:
name - The case-insensitive name of the property.
Returns:
True if the property exists in the collection; false otherwise.

indexOf

public int indexOf(java.lang.String name)
Gets the index of a property by name.
Parameters:
name - The case-insensitive name of the property.
Returns:
The zero based index. Negative value if not found.

remove

public void remove(java.lang.String name)
Removes a property with the specified name from the collection.
Parameters:
name - The case-insensitive name of the property.

removeAt

public void removeAt(int index)
Removes a property at the specified index.
Parameters:
index - The zero based index.

clear

→ inherited from com.aspose.cells.CollectionBase
public void clear()

iterator

→ inherited from com.aspose.cells.CollectionBase
public java.util.Iterator iterator()

contains

→ inherited from com.aspose.cells.CollectionBase
public boolean contains(java.lang.Object value)
Reserved for internal use.

add

→ inherited from com.aspose.cells.CollectionBase
public int add(java.lang.Object value)
Reserved for internal use.

indexOf

→ inherited from com.aspose.cells.CollectionBase
public int indexOf(java.lang.Object value)
Reserved for internal use.

See Also:
          Aspose.Cells Documentation - the home page for the Aspose.Cells Product Documentation.
          Aspose.Cells Support Forum - our preferred method of support.