Codota Logo
Expression
Code IndexAdd Codota to your IDE (free)

How to use
Expression
in
com.wizzardo.tools.evaluation

Best Java code snippets using com.wizzardo.tools.evaluation.Expression (Showing top 20 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Gson g =
  • Codota Iconnew Gson()
  • Codota IconGsonBuilder gsonBuilder;gsonBuilder.create()
  • Codota Iconnew GsonBuilder().create()
  • Smart code suggestions by Codota
}
origin: com.wizzardo.tools/tools-evaluation

  @Override
  public Object get(Map<String, Object> model) {
//        HashMap<String, Object> local = new HashMap<String, Object>(model);
    Object ob = null;
    for (Expression expression : expressions) {
      ob = expression.get(model);
    }
    return ob;
  }

origin: com.wizzardo.tools/tools-evaluation

@Override
public void setVariable(Variable v) {
  if (eh != null)
    eh.setVariable(v);
  if (args != null)
    for (Expression e : args)
      e.setVariable(v);
}
origin: com.wizzardo.tools/tools-evaluation

@Override
public Operation clone() {
  return new Operation(leftPart == null ? null : leftPart.clone(), rightPart == null ? null : rightPart.clone(), operator);
}
origin: wizzardo/tools

@Test
public void testVariable() throws Exception {
  Expression eh;
  eh = EvalTools.prepare("a=2");
  Variable a = new Variable("a", 0);
  eh.setVariable(a);
  eh.get();
  Assert.assertEquals(2, a.get());
}
origin: wizzardo/tools

@Test
public void testClone() throws Exception {
  String exp = "1+\"ololo\".substring(2)";
  Expression eh = EvalTools.prepare(exp);
  Object ob1 = eh.get(null);
  Object ob2 = eh.get(null);
  assertTrue(ob1 == ob2);
  eh = eh.clone();
  Object ob3 = eh.get(null);
  assertTrue(ob1 != ob3);
  assertTrue(ob1.equals(ob3));
}
origin: com.wizzardo.tools/tools-evaluation

if (leftPart != null) {
  if (rightPart != null) {
    ob2 = rightPart.get(model);
    ob1 = function.getThatObject().get(model);
    ob1 = operation.leftPart().get(model);
    if (ob1 instanceof Map) {
      Object key = operation.rightPart().get(model);
      if (key instanceof TemplateBuilder.GString)
        key = key.toString();
      return ob2;
    int index = ((Number) operation.rightPart().get(model)).intValue();
    if (ob1 instanceof List) {
      List l = (List) ob1;
    Object thatObject = function.getThatObject().get(model);
    Function.Getter getter = function.getGetter(thatObject);
    Function.Setter setter = function.getSetter(thatObject);
    ob1 = leftPart.get(model);
  } else if (rightPart != null) {
    ob2 = rightPart.get(model);
  return setAndReturn(model, new Function.MapSetter(leftPart != null ? leftPart.raw() : rightPart.raw()), ob1, ob2, operator);
origin: wizzardo/tools

@Override
public String toString() {
  if (hardcoded) {
    return String.valueOf(result);
  }
  return super.toString();
}
origin: com.wizzardo.tools/tools-evaluation

if (m.matches()) {
  if (m.groupCount() > 1 && m.group(2).length() > 0) {
    String value = removeUnderscores(m.group(1));
    if ("d".equals(m.group(2))) {
      return Double.valueOf(value);
    String value = removeUnderscores(exp);
    try {
      return Integer.valueOf(value);
origin: wizzardo/tools

  return Expression.Holder.NULL;
Object obj = Expression.parse(exp);
if (obj != null) {
  return new Expression.Holder(exp);
origin: wizzardo/tools

if (leftPart != null) {
  if (rightPart != null) {
    ob2 = rightPart.get(model);
    ob1 = function.getThatObject().get(model);
    ob1 = operation.leftPart().get(model);
    if (ob1 instanceof Map) {
      Object key = operation.rightPart().get(model);
      if (key instanceof TemplateBuilder.GString)
        key = key.toString();
      return ob2;
    int index = ((Number) operation.rightPart().get(model)).intValue();
    if (ob1 instanceof List) {
      List l = (List) ob1;
    Object thatObject = function.getThatObject().get(model);
    Function.Getter getter = function.getGetter(thatObject);
    Function.Setter setter = function.getSetter(thatObject);
    ob1 = leftPart.get(model);
  } else if (rightPart != null) {
    ob2 = rightPart.get(model);
  return setAndReturn(model, new Function.MapSetter(leftPart != null ? leftPart.raw() : rightPart.raw()), ob1, ob2, operator);
origin: com.wizzardo.tools/tools-evaluation

@Override
public String toString() {
  if (hardcoded) {
    return String.valueOf(result);
  }
  return super.toString();
}
origin: wizzardo/tools

if (m.matches()) {
  if (m.groupCount() > 1 && m.group(2).length() > 0) {
    String value = removeUnderscores(m.group(1));
    if ("d".equals(m.group(2))) {
      return Double.valueOf(value);
    String value = removeUnderscores(exp);
    try {
      return Integer.valueOf(value);
origin: com.wizzardo.tools/tools-evaluation

  return Expression.Holder.NULL;
Object obj = Expression.parse(exp);
if (obj != null) {
  return new Expression.Holder(exp);
origin: wizzardo/tools

  @Override
  public Object get(Map<String, Object> model) {
//        HashMap<String, Object> local = new HashMap<String, Object>(model);
    Object ob = null;
    for (Expression expression : expressions) {
      ob = expression.get(model);
    }
    return ob;
  }

origin: com.wizzardo.tools/tools-evaluation

@Override
public void setVariable(Variable v) {
  if (collection == null)
    return;
  for (Expression e : collection)
    e.setVariable(v);
}
origin: wizzardo/tools

@Override
public Operation clone() {
  return new Operation(leftPart == null ? null : leftPart.clone(), rightPart == null ? null : rightPart.clone(), operator);
}
origin: wizzardo/http

@Override
public T map(Map<String, Object> model) {
  return (T) expression.get(model);
}
origin: com.wizzardo.tools/tools-evaluation

@Override
public void setVariable(Variable v) {
  if (leftPart != null)
    leftPart.setVariable(v);
  if (rightPart != null)
    rightPart.setVariable(v);
}
origin: com.wizzardo.tools/tools-evaluation

@Override
public Expression clone() {
  TemplateBuilder tb = new TemplateBuilder();
  for (Expression e : parts) {
    tb.parts.add(e.clone());
  }
  return tb;
}
origin: com.wizzardo.tools/tools-evaluation

public Object get() {
  return get(null);
}
com.wizzardo.tools.evaluationExpression

Most used methods

  • get
  • setVariable
  • clone
  • parse
  • raw
  • removeUnderscores
  • toString

Popular in Java

  • Making http post requests using okhttp
  • setRequestProperty (URLConnection)
  • getApplicationContext (Context)
  • getSharedPreferences (Context)
  • Thread (java.lang)
    A thread is a thread of execution in a program. The Java Virtual Machine allows an application to ha
  • ConnectException (java.net)
    A ConnectException is thrown if a connection cannot be established to a remote host on a specific po
  • UnknownHostException (java.net)
    Thrown when a hostname can not be resolved.
  • SQLException (java.sql)
    An exception that indicates a failed JDBC operation. It provides the following information about pro
  • Stack (java.util)
    The Stack class represents a last-in-first-out (LIFO) stack of objects. It extends class Vector with
  • Get (org.apache.hadoop.hbase.client)
    Used to perform Get operations on a single row. To get everything for a row, instantiate a Get objec
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now