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.
 Slide get_Item(int index)
           Gets the element at the specified index.
 int getCount()
          Gets the number of all elements actually contained in the collection.
 int getLastSlidePosition()
           Returns the position of the last slide in a presentation.
 java.lang.Object getSyncRoot()
           Returns a synchronization root.
 boolean isSynchronized()
           Returns a value indicating whether access to the collection is synchronized (thread-safe).
 com.aspose.ms.System.Collections.IEnumerator<Slide> iterator()
           Returns an enumerator for the entire collection.
 void remove(Slide value)
           Removes the first occurrence of a specific object from the collection.
 void removeAt(int index)
           Removes the element at the specified index of the collection.
 int size()
          Returns the number of all elements actually contained in the collection.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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()

getCount

public int getCount()
Description copied from class: Slides

Gets 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();

Overrides:
getCount in class Slides
See Also:
SlideCollection.size()

get_Item

public Slide get_Item(int index)
Description copied from class: Slides

Gets the element at the specified index.

Overrides:
get_Item in class Slides

remove

public void remove(Slide value)
Description copied from class: Slides

Removes the first occurrence of a specific object from the collection.

Overrides:
remove in class Slides
Parameters:
value - The Slide to remove from the collection.

removeAt

public void removeAt(int index)
Description copied from class: Slides

Removes the element at the specified index of the collection.

Overrides:
removeAt in class Slides
Parameters:
index - The zero-based index of the element to remove.

iterator

public com.aspose.ms.System.Collections.IEnumerator<Slide> iterator()
Description copied from class: Slides

Returns an enumerator for the entire collection.

Specified by:
iterator in interface com.aspose.ms.System.Collections.IEnumerable<Slide>
Specified by:
iterator in interface java.lang.Iterable<Slide>
Overrides:
iterator in class Slides
Returns:
An IEnumerator for the entire collection.

getLastSlidePosition

public int getLastSlidePosition()
Description copied from class: Slides

Returns the position of the last slide in a presentation. Read-only int.

Overrides:
getLastSlidePosition in class Slides