/** * Create a <code>BlankSequence[condition]</code> pattern object for pattern-matching and term rewriting * * @param condition * additional condition which should be checked in pattern-matching * @return IPattern */ public static PatternSequence $bs(final IExpr condition) { return org.matheclipse.core.expression.PatternSequence.valueOf(null, condition, false); }
/** * Create a pattern for pattern-matching and term rewriting * * @param symbol * @param check * additional condition which should be checked in pattern-matching * @return IPattern */ public static IPatternSequence $ps(final ISymbol symbol, final IExpr check) { return PatternSequence.valueOf(symbol, check, false); }
/** * Create a pattern for pattern-matching and term rewriting * * @param symbol * @param check * additional condition which should be checked in pattern-matching * @return IPattern */ public static IPatternSequence $ps(final ISymbol symbol, final IExpr check) { if (symbol == null) { return PatternSequence.valueOf(null, check); } return PatternSequence.valueOf((Symbol) symbol, check); }
/** * Create a <code>BlankNullSequence[condition]</code> pattern object for pattern-matching and term rewriting * * @param condition * additional condition which should be checked in pattern-matching * @return IPattern */ public static PatternSequence $bns(final IExpr condition) { return org.matheclipse.core.expression.PatternSequence.valueOf(null, condition, false); }
/** * Create a pattern for pattern-matching and term rewriting * * @param symbol * @return IPattern */ public static IPatternSequence $ps(final ISymbol symbol) { return PatternSequence.valueOf(symbol, false); }
/** * * @param symbol * @param zeroArgsAllowed * if <code>true</code> 0 argument sequences are allowed for this pattern * @return */ public static IPatternSequence $ps(final ISymbol symbol, boolean zeroArgsAllowed) { return PatternSequence.valueOf(symbol, zeroArgsAllowed); }
public static PatternSequence valueOf(final ISymbol symbol, boolean zeroArgsAllowed) { return valueOf(symbol, null, zeroArgsAllowed); }
/** * Create a pattern for pattern-matching and term rewriting * * @param symbol * @param check * additional condition which should be checked in pattern-matching * @param def * if <code>true</code>, the pattern can match to a default value associated with the AST's head the * pattern is used in. * @param zeroArgsAllowed * if <code>true</code> 0 argument sequences are allowed for this pattern * @return IPattern */ public static IPatternSequence $ps(final ISymbol symbol, final IExpr check, final boolean def, boolean zeroArgsAllowed) { return PatternSequence.valueOf(symbol, check, def, zeroArgsAllowed); }
/** * Create a pattern for pattern-matching and term rewriting * * @param symbol * @param check * additional condition which should be checked in pattern-matching * @param def * if <code>true</code>, the pattern can match to a default value * associated with the AST's head the pattern is used in. * @return IPattern */ public static IPatternSequence $ps(final ISymbol symbol, final IExpr check, final boolean def) { if (symbol == null) { return PatternSequence.valueOf(null, check, def); } return PatternSequence.valueOf((Symbol) symbol, check, def); }
public static IPatternSequence initPredefinedPatternSequence(@Nonnull final ISymbol symbol) { PatternSequence temp = PatternSequence.valueOf(symbol, false); PREDEFINED_PATTERNSEQUENCE_MAP.put(symbol.toString(), temp); return temp; }
/** * Create a pattern for pattern-matching and term rewriting * * @param symbolName * the name of the pattrn symbol * @return IPattern */ public static IPatternSequence $ps(final String symbolName) { return PatternSequence.valueOf($s(symbolName), false); }