/libformula-1.1.3/source/org/pentaho/reporting/libraries/formula/function/text/TFunctionDescription.java
Java | 67 lines | 34 code | 10 blank | 23 comment | 0 complexity | 2544c99463584e8228929b7d885df1d2 MD5 | raw file
Possible License(s): LGPL-2.1
1/*
2 * This program is free software; you can redistribute it and/or modify it under the
3 * terms of the GNU Lesser General Public License, version 2.1 as published by the Free Software
4 * Foundation.
5 *
6 * You should have received a copy of the GNU Lesser General Public License along with this
7 * program; if not, you can obtain a copy at http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html
8 * or from the Free Software Foundation, Inc.,
9 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
10 *
11 * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
12 * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13 * See the GNU Lesser General Public License for more details.
14 *
15 * Copyright (c) 2006 - 2009 Pentaho Corporation and Contributors. All rights reserved.
16 */
17
18package org.pentaho.reporting.libraries.formula.function.text;
19
20import org.pentaho.reporting.libraries.formula.function.AbstractFunctionDescription;
21import org.pentaho.reporting.libraries.formula.function.FunctionCategory;
22import org.pentaho.reporting.libraries.formula.typing.Type;
23import org.pentaho.reporting.libraries.formula.typing.coretypes.AnyType;
24import org.pentaho.reporting.libraries.formula.typing.coretypes.TextType;
25
26/**
27 * Describes TFunction function.
28 * @see TFunction
29 *
30 * @author Cedric Pronzato
31 *
32 */
33public class TFunctionDescription extends AbstractFunctionDescription
34{
35 private static final long serialVersionUID = 7982024479324130664L;
36
37 public TFunctionDescription()
38 {
39 super("T", "org.pentaho.reporting.libraries.formula.function.text.T-Function");
40 }
41
42 public FunctionCategory getCategory()
43 {
44 return TextFunctionCategory.CATEGORY;
45 }
46
47 public int getParameterCount()
48 {
49 return 1;
50 }
51
52 public Type getParameterType(final int position)
53 {
54 return AnyType.TYPE;
55 }
56
57 public Type getValueType()
58 {
59 return TextType.TYPE;
60 }
61
62 public boolean isParameterMandatory(final int position)
63 {
64 return true;
65 }
66
67}