X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fadsal%2Fnorthbound%2Fcommons%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fnorthbound%2Fcommons%2Fquery%2FExpressionBuilder.java;fp=opendaylight%2Fadsal%2Fnorthbound%2Fcommons%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fnorthbound%2Fcommons%2Fquery%2FExpressionBuilder.java;h=0000000000000000000000000000000000000000;hb=50f88249a65c52ba56a48852b71ce432fed2bbeb;hp=f1b2999b77370c11442c6df2614f56d79c5b624d;hpb=abfa9a03550cbe9fccc4420684dced175dd6d119;p=controller.git diff --git a/opendaylight/adsal/northbound/commons/src/main/java/org/opendaylight/controller/northbound/commons/query/ExpressionBuilder.java b/opendaylight/adsal/northbound/commons/src/main/java/org/opendaylight/controller/northbound/commons/query/ExpressionBuilder.java deleted file mode 100644 index f1b2999b77..0000000000 --- a/opendaylight/adsal/northbound/commons/src/main/java/org/opendaylight/controller/northbound/commons/query/ExpressionBuilder.java +++ /dev/null @@ -1,41 +0,0 @@ -/** - * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0 which accompanies this distribution, - * and is available at http://www.eclipse.org/legal/epl-v10.html - */ -package org.opendaylight.controller.northbound.commons.query; - -import java.util.Stack; - -/*package*/ class ExpressionBuilder { - private final Stack _stack = new Stack(); - private LogicalExpression.OP _lastOp = null; - - public ExpressionBuilder() {} - - public ExpressionBuilder withAnd() { - _lastOp = LogicalExpression.OP.AND; - return this; - } - - public ExpressionBuilder withOr() { - _lastOp = LogicalExpression.OP.OR; - return this; - } - - public ExpressionBuilder withTerm(Expression exp) { - if (_lastOp != null) { - exp = new LogicalExpression(_lastOp, _stack.pop(), exp); - _lastOp = null; - } - _stack.push(exp); - return this; - } - - public Expression build() { - return _stack.pop(); - } - -}