com.aspose.slides
Class SlideCollection

java.lang.Object
  extended by com.aspose.slides.Slides
      extended by com.aspose.slides.SlideCollection
All Implemented Interfaces:
com.aspose.ms.System.Collections.ICollection<Slide>, com.aspose.ms.System.Collections.IEnumerable<Slide>, java.lang.Iterable<Slide>

public final class SlideCollection
extends Slides
implements com.aspose.ms.System.Collections.ICollection<Slide>

Represents a collection of a slides.


Method Summary
 void copyTo(com.aspose.ms.System.Array array, int index)
           Copies all elements from the collection to the specified array.
 java.lang.Object getSyncRoot()
           Returns a synchronization root.
 boolean isSynchronized()
           Returns a value indicating whether access to the collection is synchronized (thread-safe).
 int size()
          Returns the number of all elements actually contained in the collection.
 
Methods inherited from class com.aspose.slides.Slides
get_Item, getCount, getLastSlidePosition, iterator, remove, removeAt
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.aspose.ms.System.Collections.IEnumerable
iterator
 

Method Detail

copyTo

public void copyTo(com.aspose.ms.System.Array array,
                   int index)

Copies all elements from the collection to the specified array.

Specified by:
copyTo in interface com.aspose.ms.System.Collections.ICollection<Slide>
Parameters:
array - Target array.
index - Starting index in the target array.

isSynchronized

public boolean isSynchronized()

Returns a value indicating whether access to the collection is synchronized (thread-safe).

Specified by:
isSynchronized in interface com.aspose.ms.System.Collections.ICollection<Slide>

getSyncRoot

public java.lang.Object getSyncRoot()

Returns a synchronization root. Readonly object.

Specified by:
getSyncRoot in interface com.aspose.ms.System.Collections.ICollection<Slide>

size

public int size()

Returns the number of all elements actually contained in the collection.
There are two types of slides that can be represented in the collection: Master Slides and Normal Slides.

To get the number of Normal Slides only, use method Slides.getLastSlidePosition():
int countSlides = presentation.getSlides().getLastSlidePosition();

Specified by:
size in interface com.aspose.ms.System.Collections.ICollection<Slide>
See Also:
Slides.getCount()