public class AST1 extends AST0
Immutable (A)bstract (S)yntax (T)ree of a given function with exactly 1 argument.
In Symja, an abstract syntax tree (AST), is a tree representation of the
abstract syntactic structure of the Symja source code. Each node of the tree
denotes a construct occurring in the source code. The syntax is 'abstract' in
the sense that it does not represent every detail that appears in the real
syntax. For instance, grouping parentheses are implicit in the tree
structure, and a syntactic construct such as a Sin[x]
expression
will be denoted by an AST with 2 nodes. One node for the header
Sin
and one node for the argument x
.
java.util.List
which
contains
0
andn
arguments of a function in the index
1 to n
AST
,
Serialized FormAbstractAST.ASTIterator
IAST.PROPERTY
Modifier and Type | Field and Description |
---|---|
protected IExpr |
arg1
The first argument of this function.
|
fEvalFlags, hashValue
CONTAINS_DEFAULT_PATTERN, CONTAINS_NO_DEFAULT_PATTERN_MASK, CONTAINS_NO_PATTERN, CONTAINS_PATTERN, CONTAINS_PATTERN_EXPR, CONTAINS_PATTERN_SEQUENCE, IS_ALL_EXPANDED, IS_DECOMPOSED_PARTIAL_FRACTION, IS_EXPANDED, IS_FLAT_ORDERLESS_EVALED, IS_FLATTENED, IS_FLATTENED_OR_SORTED_MASK, IS_LISTABLE_THREADED, IS_MATRIX, IS_MATRIX_OR_VECTOR, IS_SORTED, IS_VECTOR, NO_FLAG
ASTID, BLANKID, COMPLEXID, DOUBLECOMPLEXID, DOUBLEID, FRACTIONID, INTEGERID, METHODSYMBOLID, PATTERNID, STRINGID, SYMBOLID
Modifier | Constructor and Description |
---|---|
protected |
AST1(IExpr head,
IExpr arg1)
Create a function with one arguments (i.e.
|
Modifier and Type | Method and Description |
---|---|
IExpr |
arg1()
Get the first argument (i.e. the second element of the underlying list
structure) of the
AST function (i.e. get(1) ). |
java.util.Set<IExpr> |
asSet()
Collect all arguments of this AST in a new set.
|
IAST |
clone()
Returns a new
HMArrayList with the same elements, the same size
and the same capacity as this HMArrayList . |
boolean |
contains(java.lang.Object object) |
IAST |
copy()
Returns a shallow copy of this
IAST instance (the elements
themselves are not copied). |
boolean |
equals(java.lang.Object obj)
Test if this is equal to b.
|
IExpr |
get(int location) |
int |
hashCode()
Hashcode of this Element.
|
boolean |
isSameHead(IExpr head,
int length)
Check if the object at index 0 (i.e. the head of the list) is the same
object as
head and if the size of the list equals
length . |
boolean |
isSameHead(IExpr head,
int minLength,
int maxLength)
Check if the object at index 0 (i.e. the head of the list) is the same
object as
head and if the size of the list is between
minLength and maxLength . |
boolean |
isSameHeadSizeGE(IExpr head,
int length)
Check if the object at index 0 (i.e. the head of the list) is the same
object as
head and if the size of the list is greater or
equal length . |
IExpr |
set(int location,
IExpr object)
Replaces the element at the specified location in this
ArrayList
with the specified object. |
int |
size()
Returns the number of elements in this
ArrayList . |
java.lang.Object[] |
toArray()
Returns a new array containing all elements contained in this
ArrayList . |
add, add, addAll, addAll, addAll, addAll, addOneIdentity, arg2, arg3, arg4, arg5, clear, head, isSameHead, readExternal, remove, remove, removeRange, writeExternal
$div, $minus, $plus, $times, $up, abs, accept, accept, accept, accept, addAtClone, addEvalFlags, and, appendClone, apply, apply, apply, apply, apply, args, asType, clearHashCache, compareTo, copyFrom, copyHead, copyUntil, copyUntil, dec, divide, egcd, equalsAt, equalsFromPosition, evalComplex, evalDouble, evalNumber, evalSignedNumber, evaluate, factory, filter, filter, filter, filter, filter, filter, filter, findFirstEquals, forEach, fullFormString, gcd, getAST, getAt, getEvalFlags, getHashCache, getInt, getList, getNumber, getOneIdentity, getPart, getPart, hierarchy, inc, indexOf, internalFormString, internalJavaString, internalScalaString, inverse, isAllExpanded, isAnd, isArcCos, isArcCosh, isArcSin, isArcSinh, isArcTan, isArcTanh, isAST, isAST, isAST, isAST, isAST, isAST, isAST, isASTSizeGE, isAtom, isComplex, isComplexInfinity, isComplexNumeric, isCondition, isCos, isCosh, isDerivative, isDirectedInfinity, isEmpty, isEvalFlagOff, isEvalFlagOn, isExpanded, isFlatAST, isFraction, isFree, isFree, isFree, isFreeAST, isFreeAST, isFreeAt, isFreeOfPatterns, isFunction, isGEOrdered, isGTOrdered, isInfinity, isInteger, isIntegerResult, isList, isListOfLists, isLog, isMatrix, isMember, isModule, isNegative, isNegativeInfinity, isNegativeResult, isNonNegativeResult, isNot, isNumber, isNumeric, isNumericFunction, isNumericMode, isOr, isOrderlessAST, isPatternExpr, isPlus, isPlusTimesPower, isPolynomial, isPolynomial, isPolynomialOfMaxDegree, isPolynomialOfMaxDegree, isPositive, isPositiveResult, isPower, isRationalResult, isRealResult, isRuleAST, isSame, isSame, isSequence, isSignedNumber, isSin, isSinh, isSlot, isSlotSequence, isSpan, isTan, isTanh, isTimes, isUnit, isValue, isVector, iterator, iterator0, last, lastIndexOf, leafCount, leaves, map, map, map, map, mapAt, mapAt, minus, mod, multiply, negate, negative, opposite, optional, or, patternHashCode, plus, power, power, prependClone, range, range, range, remainder, removeAtClone, replaceAll, replaceAll, replacePart, replaceRepeated, replaceRepeated, replaceSlots, setAtClone, setEvalFlags, signum, subtract, sum, times, timesDistributed, topHead, toScript, toScriptFactory, toString, variables2Slots
containsAll, removeAll, retainAll, toArray
finalize, getClass, notify, notifyAll, wait, wait, wait
containsAll, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, removeAll, replaceAll, retainAll, sort, spliterator, subList, toArray
evaluateHead, getField, ifPresent, isBlank, isConstant, isE, isFalse, isIndeterminate, isLEOrdered, isLTOrdered, isMember, isMinusOne, isNumEqualInteger, isNumEqualRational, isNumIntValue, isOne, isONE, isPattern, isPatternDefault, isPatternSequence, isPi, isPresent, isRational, isRationalValue, isSymbol, isTrue, isVariable, isZero, isZERO, multiply, ofNullable, orElse, orElseGet, orElseThrow, reciprocal
protected IExpr arg1
public final IExpr arg1()
AST
function (i.e. get(1) ). Sin(x)
, arg1()
returns x
.arg1
in interface IAST
arg1
in class AST0
AST
.IExpr.head()
public java.util.Set<IExpr> asSet()
IAST
public IAST clone()
HMArrayList
with the same elements, the same size
and the same capacity as this HMArrayList
.public IAST copy()
IAST
instance (the elements
themselves are not copied). In contrast to the clone()
method, this method returns exactly the same type for
AST0, AST1, AST2,AST3
.public boolean contains(java.lang.Object object)
public boolean equals(java.lang.Object obj)
edu.jas.structure.Element
public IExpr get(int location)
public int hashCode()
edu.jas.structure.Element
public boolean isSameHead(IExpr head, int length)
head
and if the size of the list equals
length
.isSameHead
in class AST0
head
- object to compare with element at location 0
public boolean isSameHead(IExpr head, int minLength, int maxLength)
head
and if the size of the list is between
minLength
and maxLength
.isSameHead
in class AST0
head
- object to compare with element at location 0
minLength
- minimum length of list elements.maxLength
- maximum length of list elements.public boolean isSameHeadSizeGE(IExpr head, int length)
head
and if the size of the list is greater or
equal length
.isSameHeadSizeGE
in class AST0
head
- object to compare with element at location 0
public IExpr set(int location, IExpr object)
ArrayList
with the specified object.set
in interface java.util.List<IExpr>
set
in class AST0
location
- the index at which to put the specified object.object
- the object to add.java.lang.IndexOutOfBoundsException
- when location < 0 || >= size()
public int size()
ArrayList
.public java.lang.Object[] toArray()
ArrayList
.