|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface MathMLPiecewiseElement
The piecewise element represents the piecewise definition of a function. It contains child piece elements, each represented by a MathMLCaseElement, giving the various conditions and associated function value specifications in the function definition, and an optional otherwise child element, represented by a MathMLContentElement, giving the default value of the function - that is, the value to be assigned when none of the conditions specified in the piece child elements hold.
Field Summary |
---|
Method Summary | |
---|---|
void |
deleteCase(int index)
A convenience method to delete the child piece at the position referenced by index. |
MathMLCaseElement |
getCase(int index)
A convenience method to retrieve the child piece at the position referenced by index. |
MathMLContentElement |
getCaseCondition(int index)
A convenience method to retrieve the child of the piece at the position referenced by index which gives the condition for this case. |
MathMLContentElement |
getCaseValue(int index)
A convenience method to retrieve the child of the indexth piece in this element which specifies the function value for that case. |
MathMLContentElement |
getOtherwise()
Returns a MathMLContentElement representing the value to be taken by the piecewise function when none of the conditions described in the piece children is true. |
MathMLNodeList |
getPieces()
A MathMLNodeList containing one MathMLCaseElement representing each of the piece element children of this MathMLPiecewiseElement. |
MathMLCaseElement |
insertCase(int index,
MathMLCaseElement newCase)
A convenience method to insert a new piece child into this element. |
MathMLCaseElement |
removeCase(int index)
A convenience method to remove the child piece at the position referenced by index and return it to the caller. |
MathMLCaseElement |
setCase(int index,
MathMLCaseElement caseElement)
A convenience method to set the value of the child piece at the position referenced by index to the value of case. |
MathMLContentElement |
setCaseCondition(int index,
MathMLContentElement condition)
A convenience method to set the condition for the indexth piece in this element. |
MathMLContentElement |
setCaseValue(int index,
MathMLContentElement value)
A convenience method to set the function value for the indexth piece in this element. |
void |
setOtherwise(MathMLContentElement otherwise)
setter for the otherwise attribute. |
Methods inherited from interface org.w3c.dom.mathml.MathMLElement |
---|
getClassName, getHref, getId, getMathElementStyle, getOwnerMathElement, getXref, setClassName, setHref, setId, setMathElementStyle, setXref |
Methods inherited from interface org.w3c.dom.Element |
---|
getAttribute, getAttributeNode, getAttributeNodeNS, getAttributeNS, getElementsByTagName, getElementsByTagNameNS, getSchemaTypeInfo, getTagName, hasAttribute, hasAttributeNS, removeAttribute, removeAttributeNode, removeAttributeNS, setAttribute, setAttributeNode, setAttributeNodeNS, setAttributeNS, setIdAttribute, setIdAttributeNode, setIdAttributeNS |
Methods inherited from interface org.w3c.dom.Node |
---|
appendChild, cloneNode, compareDocumentPosition, getAttributes, getBaseURI, getChildNodes, getFeature, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, getTextContent, getUserData, hasAttributes, hasChildNodes, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, setNodeValue, setPrefix, setTextContent, setUserData |
Method Detail |
---|
MathMLNodeList getPieces()
MathMLContentElement getOtherwise()
void setOtherwise(MathMLContentElement otherwise)
otherwise
- new value for otherwise.getOtherwise()
MathMLCaseElement getCase(int index)
index
- Position of desired case in the list of cases. The first
piece is numbered 1; the otherwise child (if present) is not
counted, regardless of its position. If index is greater
than the number of pieces, a null MathMLCaseElement is
returned; no error is generated.
MathMLCaseElement setCase(int index, MathMLCaseElement caseElement) throws DOMException
index
- Position of the piece to be set to case. The first piece is
numbered 1; the otherwise child (if present) is not counted,
regardless of its position. If there is currently a piece at
this position, it will be replaced by case. If index is one
more than the number of piece child elements, a new one will
be appended.case
- A MathMLCaseElement representing the new value of the
indexth piece child.
DOMException
- INDEX_SIZE_ERR: Raised if index is greater than one more
than the number of pieces in this element.void deleteCase(int index) throws DOMException
index
- Position of the piece to be deleted. The first piece is
numbered 1; the otherwise child (if present) is not counted,
regardless of its position.
DOMException
- INDEX_SIZE_ERR: Raised if index is greater than the number
of pieces in this element.MathMLCaseElement removeCase(int index) throws DOMException
index
- Position of the piece to be removed. The first piece is
numbered 1; the otherwise child (if present) is not counted,
regardless of its position.
DOMException
- INDEX_SIZE_ERR: Raised if index is greater than the number
of pieces in this element.MathMLCaseElement insertCase(int index, MathMLCaseElement newCase) throws DOMException
index
- Position before which case is to be inserted. If index is 0,
newCase is appended as the last piece child of this element.
The otherwise child (if present) is not counted, regardless
of its position.newCase
- A MathMLCaseElement representing the piece to be inserted.
DOMException
- INDEX_SIZE_ERR: Raised if index is greater one more than
the number of pieces in this element.MathMLContentElement getCaseValue(int index) throws DOMException
index
- Position of the piece whose value is being requested in the
list of pieces. The first piece is numbered 1; the otherwise
child (if present) is not counted, regardless of its
position.
DOMException
- INDEX_SIZE_ERR: Raised if index is greater than the number
of pieces in this element.MathMLContentElement setCaseValue(int index, MathMLContentElement value) throws DOMException
index
- Position of the piece whose value is being set in the list
of pieces. The first piece is numbered 1; the otherwise
child (if present) is not counted, regardless of its
position.value
- A MathMLContentElement representing the function value to be
assigned in the indexth case.
DOMException
- INDEX_SIZE_ERR: Raised if index is greater than the number
of pieces in this element.MathMLContentElement getCaseCondition(int index) throws DOMException
index
- Position of the piece whose condition is being requested in
the list of pieces. The first piece is numbered 1; the
otherwise child (if present) is not counted, regardless of
its position.
DOMException
- INDEX_SIZE_ERR: Raised if index is greater than the number
of pieces in this element.MathMLContentElement setCaseCondition(int index, MathMLContentElement condition) throws DOMException
index
- Position of the piece whose condition is being set in the
list of pieces. The first piece is numbered 1; the otherwise
child (if present) is not counted, regardless of its
position.condition
- A MathMLContentElement representing the condition to be
associated to the indexth case.
DOMException
- INDEX_SIZE_ERR: Raised if index is greater than the number
of pieces in this element.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |