Interface MathMLVectorElement

All Superinterfaces:
Element, MathMLContentElement, MathMLElement, Node
All Known Implementing Classes:
MathMLVectorElementImpl

public interface MathMLVectorElement extends MathMLContentElement
This interface represents the vector element in MathML Content. A vector is a mathematical object that has a direction and a magnitude.
Since:
1.0
Author:
Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
  • Method Details

    • getNcomponents

      int getNcomponents()
      Returns the number of components in this vector.
      Returns:
      the number of components.
    • getComponent

      MathMLContentElement getComponent(int index)
      Returns the index-th component of this vector.
      Parameters:
      index - the index of the component to retrieve.
      Returns:
      the component at the specified index.
    • insertComponent

      MathMLContentElement insertComponent(MathMLContentElement newComponent, int index) throws DOMException
      Inserts a new component into the vector at the specified index.
      Parameters:
      newComponent - the new component to insert.
      index - the index at which the new component is to be inserted.
      Returns:
      the newly inserted component.
      Throws:
      DOMException - INDEX_SIZE_ERR if the index is out of bounds.
    • setComponent

      MathMLContentElement setComponent(MathMLContentElement newComponent, int index) throws DOMException
      Replaces the component at the specified index with a new component.
      Parameters:
      newComponent - the new component to set.
      index - the index of the component to replace.
      Returns:
      the newly set component.
      Throws:
      DOMException - INDEX_SIZE_ERR if the index is out of bounds.
    • deleteComponent

      void deleteComponent(int index) throws DOMException
      Deletes the component at the specified index.
      Parameters:
      index - the index of the component to delete.
      Throws:
      DOMException - INDEX_SIZE_ERR if the index is out of bounds.
    • removeComponent

      MathMLContentElement removeComponent(int index)
      Removes and returns the component at the specified index.
      Parameters:
      index - the index of the component to remove.
      Returns:
      the removed component.