public interface IMathBlockCollection extends com.aspose.ms.System.Collections.Generic.IGenericEnumerable<IMathBlock>
Collection of math blocks (IMathBlock)
Example:IMathBlockCollection blockCollection = new MathParagraph();
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.
|
void add(IMathBlock item)
Adds IMathBlock to the end of collection.
Example:IMathBlockCollection blockCollection = new MathParagraph(); blockCollection.add(new MathBlock(new MathematicalText("x")));
item
- A mathematical block that will be added to the end of the collectionvoid 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);
index
- The zero-based index at which an item should be inserted.item
- The IMathBlock to insert.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);
item
- The object to remove from the collection.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);
index
- The zero-based index of the item to remove.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);
item
- The object to locate in the collection.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);
item
- The item to locate in the collection.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();
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);
index
- The zero-based index of the item to get.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);
index
- The zero-based index of the item to set.value
- The block of a mathematical text.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();