Package prefuse.data.expression

Examples of prefuse.data.expression.Expression


     */
    public boolean remove(Predicate p) {
        if ( p == null ) return false;
       
        IfExpression prev = null;
        Expression expr = m_head;
        while ( expr instanceof IfExpression ) {
            IfExpression ifex = (IfExpression)expr;
            Predicate test = (Predicate)ifex.getTestPredicate();
            if ( p.equals(test) ) {
                Expression elseex = ifex.getElseExpression();
                ifex.setElseExpression(new ObjectLiteral(null));
                if ( prev != null ) {
                    prev.setElseExpression(elseex);
                    if ( ifex == m_tail )
                        m_tail = prev;
View Full Code Here


     * {@link prefuse.data.expression.parser.ExpressionParser}. If an error
     * occurs during parsing, an exception will be thrown.
     * @see prefuse.data.tuple.TupleSet#addColumn(java.lang.String, java.lang.String)
     */
    public void addColumn(String name, String expr) {
        Expression ex = ExpressionParser.parse(expr);
        Throwable t = ExpressionParser.getError();
        if ( t != null ) {
            throw new RuntimeException(t);
        } else {
            addColumn(name, ex);
View Full Code Here

   
    /**
     * Create a comparison predicate fof the given data value
     */
    private ComparisonPredicate getComparison(Object o) {
        Expression left = new ColumnExpression(m_field);
        Expression right = Literal.getLiteral(o, m_type);
        return new ComparisonPredicate(ComparisonPredicate.EQ, left, right);
    }
View Full Code Here

        } else {
            ExpressionParser.ReInit(new StringReader(expr));
        }
        // attempt to parse the expression
        try {
            Expression e = Parse();
            s_error = null;
            s_logger.info("Parsed Expression: "+e);
            return e;
        } catch ( ParseException t ) {
            s_error = t;
View Full Code Here

     * any generated exceptions.
     * @param expr the expression text to parse
     * @return the parsed Expression, or null if the parse failed
     */
    public synchronized static Predicate predicate(String expr) {
        Expression ex = parse(expr, false);
        if ( ex == null ) {
            return null;
        } else if ( ex instanceof Predicate ) {
            return (Predicate) ex;
        } else {
View Full Code Here

               {if (true) return t.image.substring(1,t.image.length()-1);}
    throw new Error("Missing return statement in function");
  }

  static final public Expression Parse() throws ParseException {
  Expression e;
    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
    case TRUE:
    case FALSE:
    case NULL:
    case IF:
View Full Code Here

    }
    throw new Error("Missing return statement in function");
  }

  static final public Expression Expression() throws ParseException {
  Expression e;
    e = OrExpression();
                     {if (true) return e;}
    throw new Error("Missing return statement in function");
  }
View Full Code Here

                     {if (true) return e;}
    throw new Error("Missing return statement in function");
  }

  static final public Expression OrExpression() throws ParseException {
  Expression l, r;
    l = XorExpression();
    label_1:
    while (true) {
      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
      case OR:
View Full Code Here

       {if (true) return l;}
    throw new Error("Missing return statement in function");
  }

  static final public Expression XorExpression() throws ParseException {
  Expression l, r;
    l = AndExpression();
    label_2:
    while (true) {
      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
      case XOR:
View Full Code Here

       {if (true) return l;}
    throw new Error("Missing return statement in function");
  }

  static final public Expression AndExpression() throws ParseException {
  Expression l, r;
    l = EqualityExpression();
    label_3:
    while (true) {
      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
      case AND:
View Full Code Here

TOP

Related Classes of prefuse.data.expression.Expression

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.