@Override public Object execute(final FunctionRequest request) { request.minimumNumberOfArguments(1).maximumNumberOfArguments(1); final Course course = (Course) request.get(0); if (course.getCreditPoints() < 0) { return ""; } return "cp=\"" + course.getCreditPoints() + "\""; }
@Override public Object execute(final FunctionRequest request) { request.minimumNumberOfArguments(2).maximumNumberOfArguments(2); final Level level = (Level) request.get(0); final Integer depth = ((BigDecimal) request.get(1)).intValue(); final StringBuilder sb = new StringBuilder(); traverse(level, depth, sb); return sb.toString(); }
@Override public Boolean execute(FunctionRequest request) { Object input = request.maximumNumberOfArguments(1).minimumNumberOfArguments(1).get(0); return request .getEnvironment() .getValueEnvironment() .getCollectionConverter() .convert(input) .isDefined(); }