/** * Creates a String representation of this Function with the function name and the arguments. * The String created should be good for most subclasses */ public String toString() { StringBuffer sb = new StringBuffer(); sb.append(getName()); sb.append("("); List<org.opengis.filter.expression.Expression> params = getParameters(); if (params != null) { org.opengis.filter.expression.Expression exp; for (Iterator<org.opengis.filter.expression.Expression> it = params.iterator(); it.hasNext(); ) { exp = it.next(); sb.append("["); sb.append(exp); sb.append("]"); if (it.hasNext()) { sb.append(", "); } } } sb.append(")"); return sb.toString(); }
public synchronized FunctionName getFunctionName() { if (functionName == null) { functionName = new FunctionNameImpl(getName(), functionName.getArgumentCount()); } return functionName; }
public void testGetName() { FunctionExpressionImpl anonymous = new FunctionExpressionImpl( FunctionExpressionImpl.functionName("testFunction", "text:String")) {}; assertEquals("testFunction", anonymous.getName()); }
/** * The missing toString() method. * * @param expression the expression * @return the string */ private static String missingToString(FunctionExpressionImpl expression) { StringBuilder sb = new StringBuilder(); sb.append(expression.getName()); sb.append("("); List<org.opengis.filter.expression.Expression> params = expression.getParameters(); if (params != null) { org.opengis.filter.expression.Expression exp; for (Iterator<org.opengis.filter.expression.Expression> it = params.iterator(); it.hasNext(); ) { exp = it.next(); sb.append("["); sb.append(exp); sb.append("]"); if (it.hasNext()) { sb.append(", "); } } } sb.append(")"); return sb.toString(); }
/** * Creates a String representation of this Function with * the function name and the arguments. The String created * should be good for most subclasses */ public String toString(){ StringBuffer sb = new StringBuffer(); sb.append(getName()); sb.append("("); List<org.opengis.filter.expression.Expression> params = getParameters(); if(params != null){ org.opengis.filter.expression.Expression exp; for(Iterator<org.opengis.filter.expression.Expression> it = params.iterator(); it.hasNext();){ exp = it.next(); sb.append("["); sb.append(exp); sb.append("]"); if(it.hasNext()){ sb.append(", "); } } } sb.append(")"); return sb.toString(); }
/** * Creates a String representation of this Function with * the function name and the arguments. The String created * should be good for most subclasses */ public String toString(){ StringBuffer sb = new StringBuffer(); sb.append(getName()); sb.append("("); List params = getParameters(); if(params != null){ org.opengis.filter.expression.Expression exp; for(Iterator it = params.iterator(); it.hasNext();){ exp = (Expression) it.next(); sb.append("["); sb.append(exp); sb.append("]"); if(it.hasNext()){ sb.append(", "); } } } sb.append(")"); return sb.toString(); }
public synchronized FunctionName getFunctionName() { if( functionName == null ){ functionName = new FunctionNameImpl( getName(), getArgCount() ); } return functionName; }
public boolean equals(Object obj) { if( obj == null || !(obj instanceof Function)){ return false; } Function other = (Function) obj; if( ( getName() == null && other.getName() != null ) || (getName() != null && !getName().equalsIgnoreCase( other.getName() ))){ return false; } if( getParameters() == null && other.getClass() != null ){ return false; } return getParameters() != null && getParameters().equals( other.getParameters() ); } }
public boolean equals(Object obj) { if( obj == null || !(obj instanceof Function)){ return false; } Function other = (Function) obj; if( ( getName() == null && other.getName() != null ) || (getName() != null && !getName().equalsIgnoreCase( other.getName() ))){ return false; } if( getParameters() == null && other.getClass() != null ){ return false; } return getParameters() != null && getParameters().equals( other.getParameters() ); } }