public interface IMathElementCollection extends com.aspose.ms.System.Collections.Generic.IGenericEnumerable<IMathElement>
Represents a collection of mathematical elements (MathElement).
Example:IMathElementCollection collection = new MathBlock();
Modifier and Type | Method and Description |
---|---|
void |
add(IMathElement item)
Adds a math element to the end of the collection.
|
void |
clear()
Removes all elements from the collection.
|
boolean |
contains(IMathElement item)
Determines whether the collection contains a specific value.
|
void |
copyTo(IMathElement[] array,
int arrayIndex)
Copy to specified array.
|
IMathElement |
get_Item(int index)
Gets the element at the specified index.
|
int |
getCount()
Gets the number of elements actually contained in the collection.
|
int |
indexOf(IMathElement item)
Determines the index of a specific math element in collection.
|
void |
insert(int index,
IMathElement item)
Inserts a math element into the collection at the specified index.
|
boolean |
remove(IMathElement item)
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.
|
IMathElement get_Item(int index)
Gets the element at the specified index.
Read-only IMathElement
.
Example:IMathElementCollection collection = new MathBlock(new MathematicalText("x")); IMathElement firstElem = collection.get_Item(0);
index
- The zero-based index of the item to getint getCount()
Gets the number of elements actually contained in the collection.
Read-only int
.
Example:IMathElementCollection collection = new MathBlock(new MathematicalText("x")); int count = collection.getCount();
void add(IMathElement item)
Adds a math element to the end of the collection.
Example:IMathElementCollection collection = new MathBlock(new MathematicalText("x")); collection.add(new MathematicalText("+")); collection.add(new MathRadical(new MathematicalText("x"), new MathematicalText("3")));
item
- The IMathElement to be added to the end of the collection.int indexOf(IMathElement item)
Determines the index of a specific math element in collection.
Example:IMathElementCollection collection = new MathBlock(new MathematicalText("x")); MathematicalText plusElement = new MathematicalText("+"); collection.add(plusElement); collection.add(new MathRadical(new MathematicalText("x"), new MathematicalText("3"))); int index = collection.indexOf(plusElement);
item
- The element to locate in the collection.void insert(int index, IMathElement item)
Inserts a math element into the collection at the specified index.
Example:IMathElementCollection collection = new MathBlock(new MathematicalText("x")); MathematicalText plusElement = new MathematicalText("+"); collection.add(plusElement); collection.insert(0, new MathRadical(new MathematicalText("x"), new MathematicalText("3")));
index
- The zero-based index at which IMathElement should be inserted.item
- The IMathElement to insert.void clear()
Removes all elements from the collection.
Example:IMathElementCollection collection = new MathBlock(new MathematicalText("x")); collection.clear();
boolean contains(IMathElement item)
Determines whether the collection contains a specific value.
Example:IMathElementCollection collection = new MathBlock(new MathematicalText("x")); MathematicalText plusElement = new MathematicalText("+"); collection.add(plusElement); collection.add(new MathRadical(new MathematicalText("x"), new MathematicalText("3"))); bool contains = collection.contains(plusElement);
item
- The object to locate in the collection.boolean remove(IMathElement item)
Removes the first occurrence of a specific object from the collection.
Example:IMathElementCollection collection = new MathBlock(new MathematicalText("x")); MathematicalText plusElement = new MathematicalText("+"); collection.add(plusElement); collection.add(new MathRadical(new MathematicalText("x"), new MathematicalText("3"))); collection.remove(plusElement);
item
- The object to remove from the collection.void removeAt(int index)
Removes the element at the specified index of the collection.
Example:IMathElementCollection collection = new MathBlock(new MathematicalText("x")); MathematicalText plusElement = new MathematicalText("+"); collection.add(plusElement); collection.insert(0, new MathRadical(new MathematicalText("x"), new MathematicalText("3"))); collection.removeAt(2);
index
- The zero-based index of the element to remove.void copyTo(IMathElement[] array, int arrayIndex)
Copy to specified array.
Example:IMathElementCollection collection = new MathBlock(new MathematicalText("x")); MathematicalText plusElement = new MathematicalText("+"); collection.add(plusElement); collection.add(new MathRadical(new MathematicalText("x"), new MathematicalText("3"))); IMathElement[] destinationArray = new IMathElement[collection.Count]; collection.copyTo(destinationArray, 0);
array
- Array to copy to.arrayIndex
- Index to begin copying.Copyright © 2004-2022 Aspose Pty Ltd. All Rights Reserved.