public class VariablesSet
extends java.lang.Object
java.util.Set
.Modifier and Type | Class and Description |
---|---|
class |
VariablesSet.IsMemberVisitor
Return
true , if the expression contains one of the variable
store in the internal java.util.Set . |
static class |
VariablesSet.VariablesVisitor
Collect the variables with the
IExpr#isVariable() method. |
Constructor and Description |
---|
VariablesSet()
Constructor for an empty instance.
|
VariablesSet(IExpr expression)
Determine the variable symbols from a Symja expression.
|
Modifier and Type | Method and Description |
---|---|
boolean |
add(IExpr symbol)
Add the symbol to the set of variables.
|
void |
addVarList(IAST rest,
int fromIndex)
Add the variables of the given expression
|
void |
addVarList(IExpr expression)
Add the variables of the given expression
|
java.util.List<IExpr> |
appendToList(java.util.List<IExpr> list)
Append the set of variables to a
List<IExpr> list of
variables. |
boolean |
contains(ISymbol o)
Searches the set for the specified object.
|
boolean |
containsAll(java.util.Collection<? extends IExpr> c)
Searches this set for all objects in the specified collection.
|
java.util.List<IExpr> |
getArrayList()
Transform the set of variables into a
List<IExpr> list
of ordered variables. |
IAST |
getVarList()
Transform the set of variables into an
IAST list of ordered
variables. |
java.lang.String[] |
getVarListAsString() |
boolean |
isEmpty()
Returns true if this set of variables has no elements.
|
static java.util.function.Predicate<IExpr> |
isFree(VariablesSet exprVar)
Return a
Predicate which tests, if the given input is free
of the variables set. |
boolean |
isSize(int size)
Check if the expression contains the given number of variables.
|
int |
size()
The number of determined variables.
|
IExpr[] |
toArray(IExpr[] a) |
public VariablesSet()
public VariablesSet(IExpr expression)
public static java.util.function.Predicate<IExpr> isFree(VariablesSet exprVar)
Predicate
which tests, if the given input is free
of the variables set.exprVar
- public boolean add(IExpr symbol)
symbol
- public void addVarList(IExpr expression)
expression
- public void addVarList(IAST rest, int fromIndex)
expression
- public java.util.List<IExpr> appendToList(java.util.List<IExpr> list)
List<IExpr>
list of
variables.public boolean contains(ISymbol o)
o
- Set.contains(java.lang.Object)
public boolean containsAll(java.util.Collection<? extends IExpr> c)
c
- Set.containsAll(java.util.Collection)
public java.util.List<IExpr> getArrayList()
List<IExpr>
list
of ordered variables.public IAST getVarList()
IAST
list of ordered
variables.public java.lang.String[] getVarListAsString()
public boolean isEmpty()
Set.isEmpty()
public boolean isSize(int size)
expr
- true
if the expr contains the given number of
variables.public int size()