本文整理了Java中org.opengis.filter.expression.Add
类的一些代码示例,展示了Add
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Add
类的具体详情如下:
包路径:org.opengis.filter.expression.Add
类名称:Add
[英]Encodes the operation of addition.
Instances of this interface implement their #evaluate method by computing the numeric addition of their #getExpression1 and #getExpression2 operand.
[中]对加法运算进行编码。
此接口的实例通过计算其#getExpression1和#getExpression2操作数的数字相加来实现其#evaluate方法。
代码示例来源:origin: geotools/geotools
public Object visit(Add expression, Object data) {
data = expression.getExpression1().accept(this, data);
data = expression.getExpression2().accept(this, data);
return data;
}
代码示例来源:origin: locationtech/geogig
public Expression[] visit(Add expression, Object extraData) {
Expression[] e1 = (Expression[]) expression.getExpression1().accept(this, null);
Expression[] e2 = (Expression[]) expression.getExpression1().accept(this, null);
Expression pre = e1[0] == null || e2[0] == null ? null : ff.add(e1[0], e2[0]);
Expression post = e1[1] == null || e2[1] == null ? null : ff.add(e1[1], e2[1]);
return new Expression[] { pre, post };
}
代码示例来源:origin: locationtech/geowave
@Override
public Object visit(final Add expression, final Object data) {
return expression.accept(this, data);
}
代码示例来源:origin: geotools/geotools
@Test
public void testNumbers() {
Add add = ff.add(ff.literal(Byte.valueOf((byte) 1)), ff.property("s"));
assertEquals(Short.class, add.accept(visitor, null));
Multiply mul = ff.multiply(ff.property("l"), ff.property("s"));
assertEquals(Long.class, mul.accept(visitor, null));
Divide div = ff.divide(ff.literal(new BigInteger("10")), ff.property("s"));
assertEquals(BigInteger.class, div.accept(visitor, null));
Subtract sub = ff.subtract(ff.literal(new BigInteger("10")), ff.property("d"));
assertEquals(BigDecimal.class, sub.accept(visitor, null));
}
代码示例来源:origin: geotools/geotools
/** visit each expression and check that they are static */
public Boolean visit(Add expression, Object data) {
boolean isStatic;
isStatic = (Boolean) expression.getExpression1().accept(this, data);
if (isStatic == false) return false;
isStatic = (Boolean) expression.getExpression2().accept(this, data);
return isStatic;
}
/** visit each expression and check that they are static */
代码示例来源:origin: geotools/geotools
public Object visit(Add expression, Object data) {
expression.getExpression1().accept(this, data);
if (found) return found;
expression.getExpression2().accept(this, data);
return found;
}
代码示例来源:origin: geotools/geotools
public Object visit(Add expression, Object data) {
data = expression.getExpression1().accept(this, data);
data = expression.getExpression2().accept(this, data);
return data;
}
代码示例来源:origin: geotools/geotools
public AddBuilder reset(Add original) {
unset = false;
expr1 = new ChildExpressionBuilder<AddBuilder>(this, original.getExpression1());
expr2 = new ChildExpressionBuilder<AddBuilder>(this, original.getExpression2());
return this;
}
代码示例来源:origin: geotools/geotools
@Override
public Object visit(Add expression, Object extraData) {
StringBuilder output = asStringBuilder(extraData);
expression.getExpression1().accept(this, output);
output.append(" + ");
expression.getExpression2().accept(this, output);
return output;
}
代码示例来源:origin: geotools/geotools
public Object visit(Add expression, Object data) {
data = expression.getExpression1().accept(this, data);
if (found(data)) return data;
data = expression.getExpression2().accept(this, data);
return data;
}
代码示例来源:origin: geotools/geotools
public Object visit(Add expression, Object extraData) {
String type = "Add";
start(type);
expression.getExpression1().accept(this, extraData);
expression.getExpression2().accept(this, extraData);
end(type);
return extraData;
}
代码示例来源:origin: geotools/geotools
public Object visit(Add expression, Object extraData) {
Expression expr1 = visit(expression.getExpression1(), extraData);
Expression expr2 = visit(expression.getExpression2(), extraData);
return getFactory(extraData).add(expr1, expr2);
}
代码示例来源:origin: geotools/geotools
public void testAddParse() throws Exception {
FilterMockData.add(document, document);
Add add = (Add) parse();
assertNotNull(add.getExpression1());
assertNotNull(add.getExpression2());
}
代码示例来源:origin: geotools/geotools
public void testAddParse() throws Exception {
FilterMockData.add(document, document);
Add add = (Add) parse();
assertNotNull(add.getExpression1());
assertNotNull(add.getExpression2());
}
代码示例来源:origin: org.geotools/gt-main
public Object visit( Add expression, Object data ) {
data = expression.getExpression1().accept( this, data);
data = expression.getExpression2().accept( this, data);
return data;
}
代码示例来源:origin: org.geotools/gt-main
public Object visit( Add expression, Object data ) {
expression.getExpression1().accept( this, data);
if( found ) return found;
expression.getExpression2().accept( this, data);
return found;
}
代码示例来源:origin: org.geotools/gt-main
public Object visit( Add expression, Object data ) {
data = expression.getExpression1().accept( this, data);
data = expression.getExpression2().accept( this, data);
return data;
}
代码示例来源:origin: org.geotools/gt-main
/** visit each expression and check that they are static */
public Boolean visit( Add expression, Object data ) {
boolean isStatic;
isStatic = (Boolean) expression.getExpression1().accept( this, data);
if( isStatic == false ) return false;
isStatic = (Boolean) expression.getExpression2().accept( this, data);
return isStatic;
}
/** visit each expression and check that they are static */
代码示例来源:origin: org.geotools/gt2-main
public Object visit( Add expression, Object data ) {
expression.getExpression1().accept( this, data);
expression.getExpression2().accept( this, data);
return data;
}
代码示例来源:origin: org.geotools/gt-cql
@Override
public Object visit(Add expression, Object extraData) {
StringBuilder output = asStringBuilder(extraData);
expression.getExpression1().accept(this, output );
output.append( " + " );
expression.getExpression2().accept(this, output );
return output;
}
内容来源于网络,如有侵权,请联系作者删除!