<p>map.</p>

@param operator a {@link java.lang.String} object.
@param arg a {@link ameba.db.dsl.QueryExprMeta.Val} object.
@param parent a {@link ameba.db.dsl.QueryExprMeta} object.
@return a {@link io.ebean.Expression} object.
327130
public static Expression map(String operator, Val<Expression> arg, QueryExprMeta parent) {
        if (parent == null) {
            throw new QuerySyntaxException(Messages.get("dsl.arguments.error5", operator));
        } else if (!parent.operator().equals("option")) {
            throw new QuerySyntaxException(Messages.get("dsl.arguments.error6", operator, "option"));
        }
        return MapExpression.of(operator, arg);
    }
243053
public static PredicateOperation predicate(Operator operator, Expression<?>... args) {
        return predicate(operator, ImmutableList.copyOf(args));
    }
1254465
function (parentBuilder, field) {
    if (!dataUtils.isValidStr(field)) throw "Invalid field, should be a string: " + dataUtils.JSONstringify(field);

    /**
     * Ensures a comparison of the field with the value.
     * @param {string} comparator e.g. "$gt", "$gte", etc.
     * @param {*} value
     * @returns {QueryBuilder} the parent Builder. Use .andField()
     * to chain further with this builder.
     */
    this.is = function (comparator, value) {
        return parentBuilder._compare(field, comparator, value);
    };

    /**
     * Ensures that the field matches the given value. This is same
     * as calling matchAll([value]).
     * @param {*} value
     * @returns {QueryBuilder} the parent Builder. Use .andField()
     * to chain further with this builder.
     */
    this.matches = function (value) {
        return parentBuilder._matchesAll(field, [value]);
    };

    /**
     * Ensures that the field matches all the values.
     * @param {Array.<*>} values
     * @returns {QueryBuilder} the parent Builder. Use .andField()
     * to chain further with this builder.
     */
    this.matchesAll = function (values) {
        return parentBuilder._matchesAll(field, values);
    };

    /**
     * Ensures that the field matches at least one of the values.
     * @param {Array.<*>} values
     * @param {boolean} [addToExistingOr=false] If true, this will
     * be added to the existing OR list ($in), if any.
     * @returns {QueryBuilder} the parent Builder. Use .andField()
     * to chain further with this builder.
     */
    this.matchesAny = function (values, addToExistingOr) {
        return parentBuilder._matchesAny(field, values, addToExistingOr);
    };
}
1275872
static <T> Parser<T> buildExpressionParser(
      final Parser<? extends T> term, final Operator... ops) {
    if (ops.length == 0) return term.cast();
    int begin = 0;
    int precedence = ops[0].precedence;
    Associativity associativity = ops[0].associativity;
    int end = 0;
    Parser<T> ret = term.cast();
    for (int i = 1; i < ops.length; i++) {
      Operator op = ops[i];
      end = i;
      if (op.precedence == precedence && op.associativity == associativity) {
        continue;
      }
      end = i;
      Parser<?> p = slice(ops, begin, end);
      ret = build(p, associativity, ret);
      begin = i;
      precedence = ops[i].precedence;
      associativity = ops[i].associativity;
    }
    if (end != ops.length) {
      end = ops.length;
      associativity = ops[begin].associativity;
      Parser<?> p = slice(ops, begin, end);
      ret = build(p, associativity, ret);
    }
    return ret;
  }
1038060
protected String naryOperator(final NAryOperator operator, final String opString) {
        final StringBuilder sb = new StringBuilder();
        int count = 0;
        final int size = operator.numberOfOperands();
        Formula last = null;
        for (final Formula op : operator) {
            if (++count == size) {
                last = op;
            } else {
                sb.append(operator.type().precedence() < op.type().precedence() ? this.toString(op) : this.bracket(op));
                sb.append(opString);
            }
        }
        if (last != null) {
            sb.append(operator.type().precedence() < last.type().precedence() ? this.toString(last) : this.bracket(last));
        }
        return sb.toString();
    }
1343339
public static <T> DslOperation<T> dslOperation(Class<? extends T> type, Operator operator,
            Expression<?>... args) {
        return new DslOperation<T>(type, operator, args);
    }
144853
public static IndexOperator getIndexOperator(String operator)
    {
        if (operator.equals("="))
        {
            return IndexOperator.EQ;
        }
        else if (operator.equals(">="))
        {
            return IndexOperator.GTE;
        }
        else if (operator.equals(">"))
        {
            return IndexOperator.GT;
        }
        else if (operator.equals("<"))
        {
            return IndexOperator.LT;
        }
        else if (operator.equals("<="))
        {
            return IndexOperator.LTE;
        }

        return null;
    }
191436
public static @NonNull OptionalDouble map(final @NonNull OptionalDouble optional, final @NonNull DoubleUnaryOperator operator) {
    requireNonNull(operator, "operator");
    return optional.isPresent() ? OptionalDouble.of(operator.applyAsDouble(optional.getAsDouble())) : OptionalDouble.empty();
  }
1003152
public static Expression fields(String operator, Val<Expression>[] args, QueryExprMeta parent) {
        if (args.length < 1) {
            throw new QuerySyntaxException(Messages.get("dsl.arguments.error2", operator, 0));
        }
        if (parent == null) {
            throw new QuerySyntaxException(Messages.get("dsl.arguments.error5", operator));
        } else if (!parent.operator().equals("option")) {
            throw new QuerySyntaxException(Messages.get("dsl.arguments.error6", operator, "option"));
        }

        return TextFieldsExpression.of(args);
    }
57975
public GroovyExpression generateAdjacentVerticesExpression(GroovyExpression parent, AtlasEdgeDirection dir,
            String label) {
        return new FunctionCallExpression(TraversalStepType.FLAT_MAP_TO_ELEMENTS, parent, getGremlinFunctionName(dir), new LiteralExpression(label));
    }
29408
@Override
    protected void processOperator(Operator operator, List<COSBase> arguments)
            throws IOException
    {
        String operation = operator.getName();
        /*System.out.println("Operator: " + operation + ":" + arguments.size());
        if (operation.equals("sc") || operation.equals("cs"))
        {
            System.out.print("  ");
            for (int i = 0; i < arguments.size(); i++)
                System.out.print(arguments.get(i) + " ");
            System.out.println();
        }*/

        //word spacing
        if (operation.equals("Tw"))
        {
            style.setWordSpacing(getLength(arguments.get(0)));
        }

        //letter spacing
        else if (operation.equals("Tc"))
        {
            style.setLetterSpacing(getLength(arguments.get(0)));
        }

        //graphics
        else if (operation.equals("m")) //move
        {
            if (!disableGraphics)
            {
                if (arguments.size() == 2)
                {
                    float[] pos = transformPosition(getLength(arguments.get(0)), getLength(arguments.get(1)));
                    path_x = pos[0];
                    path_y = pos[1];
                    path_start_x = pos[0];
                    path_start_y = pos[1];
                }
            }
        }
        else if (operation.equals("l")) //line
        {
            if (!disableGraphics)
            {
                if (arguments.size() == 2)
                {
                    float[] pos = transformPosition(getLength(arguments.get(0)), getLength(arguments.get(1)));
                    graphicsPath.add(new PathSegment(path_x, path_y, pos[0], pos[1]));
                    path_x = pos[0];
                    path_y = pos[1];
                }
            }
        }
        else if (operation.equals("h")) //end subpath
        {
            if (!disableGraphics)
            {
                graphicsPath.add(new PathSegment(path_x, path_y, path_start_x, path_start_y));
            }
        }

        //rectangle
        else if (operation.equals("re"))
        {
            if (!disableGraphics)
            {
                if (arguments.size() == 4)
                {
                	float x = getLength(arguments.get(0));
                	float y = getLength(arguments.get(1));
                	float width = getLength(arguments.get(2));
                	float height = getLength(arguments.get(3));

                    float[] p1 = transformPosition(x, y);
                    float[] p2 = transformPosition(x + width, y + height);

                	graphicsPath.add(new PathSegment(p1[0], p1[1], p2[0], p1[1]));
                    graphicsPath.add(new PathSegment(p2[0], p1[1], p2[0], p2[1]));
                    graphicsPath.add(new PathSegment(p2[0], p2[1], p1[0], p2[1]));
                    graphicsPath.add(new PathSegment(p1[0], p2[1], p1[0], p1[1]));
                }
            }
        }

        //fill
        else if (operation.equals("f") || operation.equals("F") || operation.equals("f*"))
        {
            renderPath(graphicsPath, false, true);
            graphicsPath.removeAllElements();
        }

        //stroke
        else if (operation.equals("S"))
        {
            renderPath(graphicsPath, true, false);
            graphicsPath.removeAllElements();
        }
        else if (operation.equals("s"))
        {
            graphicsPath.add(new PathSegment(path_x, path_y, path_start_x, path_start_y));
            renderPath(graphicsPath, true, false);
            graphicsPath.removeAllElements();
        }

        //stroke and fill
        else if (operation.equals("B") || operation.equals("B*"))
        {
            renderPath(graphicsPath, true, true);
            graphicsPath.removeAllElements();
        }
        else if (operation.equals("b") || operation.equals("b*"))
        {
            graphicsPath.add(new PathSegment(path_x, path_y, path_start_x, path_start_y));
            renderPath(graphicsPath, true, true);
            graphicsPath.removeAllElements();
        }

        //cancel path
        else if (operation.equals("n"))
        {
            graphicsPath.removeAllElements();
        }

        //invoke named object - images
        else if (operation.equals("Do"))
        {
            if (!disableImages)
                processImageOperation(arguments);
        }

        super.processOperator(operator, arguments);
    }
423492
public static void main(String[] args) {
		if (args.length != 1) {
			System.err.println("usage: java " + Builder.class.getName() + " <expression string>");
			System.exit(1);
		}
		PrintWriter out = new PrintWriter(System.out);
		Tree tree = null;
		try {
			tree = new Builder(Feature.METHOD_INVOCATIONS).build(args[0]);
		} catch (TreeBuilderException e) {
			System.out.println(e.getMessage());
			System.exit(0);
		}
		NodePrinter.dump(out, tree.getRoot());
		if (!tree.getFunctionNodes().iterator().hasNext() && !tree.getIdentifierNodes().iterator().hasNext()) {
			ELContext context = new ELContext() {
				@Override
				public VariableMapper getVariableMapper() {
					return null;
				}
				@Override
				public FunctionMapper getFunctionMapper() {
					return null;
				}
				@Override
				public ELResolver getELResolver() {
					return null;
				}
			};
			out.print(">> ");
			try {
				out.println(tree.getRoot().getValue(new Bindings(null, null), context, null));
			} catch (ELException e) {
				out.println(e.getMessage());
			}
		}
		out.flush();
	}
105542
@Override
  public <T, U> BindingBuilder<T> provider(Key<U> parent, Method m)
  {
    throw new UnsupportedOperationException(getClass().getName());
  }
155389
private function mapOperator($operator)
    {
        if (array_key_exists($operator, $this->shortOperators)) {
            $operator = $this->shortOperators[$operator];
        }

        if (!in_array($operator, $this->allowedOperators)) {
            throw new InvalidArgumentException(sprintf(
                'Invalid operator `%s` given. Valid operators are %s.',
                $operator,
                implode(', ', $this->allowedOperators)
            ));
        }

        return $operator;
    }
592681
def _check_operator(self, operator):
        

        if not isinstance(operator, type(None)):
            tree = [obj.__name__ for obj in getmro(operator.__class__)]

            if not any([parent in tree for parent in self._op_parents]):
                warn('{0} does not inherit an operator '
                     'parent.'.format(str(operator.__class__)))
668770
public static <T extends Number & Comparable<?>> NumberOperation<T> numberOperation(Class<? extends T> type,
            Operator operator, Expression<?>... args) {
        return new NumberOperation<T>(type, operator, args);
    }
105909
@Override
  public <T> Streamlet<T> applyOperator(IStreamletOperator<R, T> operator) {
    checkNotNull(operator, "operator cannot be null");

    // By default, NoneStreamGrouping stategy is used. In this stategy, tuples are forwarded
    // from parent component to a ramdon one of all the instances of the child component,
    // which is the same logic as shuffle grouping.
    return applyOperator(operator, new NoneStreamGrouping());
  }