com.aspose.slides

Interfaces

Classes

Exceptions

com.aspose.slides

Interface IMathBlockCollection

  • All Superinterfaces:
    com.aspose.ms.System.Collections.IEnumerable<IMathBlock>, com.aspose.ms.System.Collections.Generic.IGenericEnumerable<IMathBlock>, java.lang.Iterable<IMathBlock>
    All Known Subinterfaces:
    IMathParagraph
    All Known Implementing Classes:
    MathParagraph


    public interface IMathBlockCollection
    extends com.aspose.ms.System.Collections.Generic.IGenericEnumerable<IMathBlock>

    Collection of math blocks (IMathBlock)


    Example:
     
     IMathBlockCollection blockCollection = new MathParagraph();
     
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method and Description
      void add(IMathBlock item)
      Adds IMathBlock to the end of collection.
      void clear()
      Removes all elements from the collection.
      boolean contains(IMathBlock item)
      Determines whether the collection contains a specific value.
      IMathBlock get_Item(int index)
      Gets the item at the specified index.
      int getCount()
      Gets the number of elements actually contained in the collection.
      int indexOf(IMathBlock item)
      Determines the index of a specific IMathBlock in collection.
      void insert(int index, IMathBlock item)
      Inserts IMathBlock into the collection at the specified index.
      boolean remove(IMathBlock item)
      Removes the first occurrence of a specific object from the collection.
      void removeAt(int index)
      Removes an item at the specified index of the collection.
      void set_Item(int index, IMathBlock value)
      Gets the item at the specified index.
      • Methods inherited from interface com.aspose.ms.System.Collections.Generic.IGenericEnumerable

        iterator
      • Methods inherited from interface java.lang.Iterable

        forEach, spliterator
    • Method Detail

      • add

        void add(IMathBlock item)

        Adds IMathBlock to the end of collection.


        Example:
         
         IMathBlockCollection blockCollection = new MathParagraph();
         blockCollection.add(new MathBlock(new MathematicalText("x")));
         
        Parameters:
        item - A mathematical block that will be added to the end of the collection
      • insert

        void insert(int index,
                    IMathBlock item)

        Inserts IMathBlock into the collection at the specified index.


        Example:
         
         IMathBlockCollection blockCollection = new MathParagraph();
         IMathBlock block = new MathBlock(new MathematicalText("y"));
         blockCollection.insert(0, block);
         
        Parameters:
        index - The zero-based index at which an item should be inserted.
        item - The IMathBlock to insert.
      • remove

        boolean remove(IMathBlock item)

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


        Example:
         
         IMathBlockCollection blockCollection = new MathParagraph();
         IMathBlock block = new MathBlock(new MathematicalText("y"));
         blockCollection.add(block);
         blockCollection.remove(block);
         
        Parameters:
        item - The object to remove from the collection.
        Returns:
        true if item was successfully removed from the collection; otherwise, false. This method also returns false if item is not found in the original collection.
      • removeAt

        void removeAt(int index)

        Removes an item at the specified index of the collection.


        Example:
         
         IMathBlockCollection blockCollection = new MathParagraph();
         IMathBlock block = new MathBlock(new MathematicalText("y"));
         blockCollection.add(block);
         blockCollection.removeAt(0);
         
        Parameters:
        index - The zero-based index of the item to remove.
      • contains

        boolean contains(IMathBlock item)

        Determines whether the collection contains a specific value.


        Example:
         
         IMathBlockCollection blockCollection = new MathParagraph();
         IMathBlock block = new MathBlock(new MathematicalText("y"));
         blockCollection.addd(block);
         bool contains = blockCollection.contains(block);
         
        Parameters:
        item - The object to locate in the collection.
        Returns:
        true if item is found in the collection; otherwise, false.
      • indexOf

        int indexOf(IMathBlock item)

        Determines the index of a specific IMathBlock in collection.


        Example:
         
         IMathBlockCollection blockCollection = new MathParagraph();
         IMathBlock block = new MathBlock(new MathematicalText("y"));
         blockCollection.add(block);
         int index = blockCollection.indexOf(block);
         
        Parameters:
        item - The item to locate in the collection.
        Returns:
        The index of item if found in the collection; otherwise, -1.
      • getCount

        int getCount()

        Gets the number of elements actually contained in the collection. Read-only int.


        Example:
         
         IMathBlockCollection blockCollection = new MathParagraph();
         blockCollection.add(new MathBlock(new MathematicalText("block1")));
         blockCollection.add(new MathBlock(new MathematicalText("block2")));
         int blocksCount = blockCollection.getCount();
         
      • get_Item

        IMathBlock get_Item(int index)

        Gets the item at the specified index. Read-only IMathBlock.


        Example:
         
         IMathBlockCollection blockCollection = new MathParagraph();
         blockCollection.add(new MathBlock(new MathematicalText("block1")));
         blockCollection.add(new MathBlock(new MathematicalText("block2")));
         IMathBlock block = blockCollection.get_Item(1);
         
        Parameters:
        index - The zero-based index of the item to get
      • set_Item

        void set_Item(int index,
                      IMathBlock value)

        Gets the item at the specified index. Read-only IMathBlock.


        Example:
         
         IMathBlockCollection blockCollection = new MathParagraph();
         blockCollection.add(new MathBlock(new MathematicalText("block1")));
         blockCollection.add(new MathBlock(new MathematicalText("block2")));
         IMathBlock block = blockCollection.get_Item(1);
         
        Parameters:
        index - The zero-based index of the item to get
      • clear

        void clear()

        Removes all elements from the collection.


        Example:
         
         IMathBlockCollection blockCollection = new MathParagraph();
         blockCollection.add(new MathBlock(new MathematicalText("block1")));
         blockCollection.add(new MathBlock(new MathematicalText("block2")));
         blockCollection.clear();