PageRenderTime 69ms CodeModel.GetById 24ms RepoModel.GetById 0ms app.codeStats 0ms

/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. package org.pentaho.reporting.libraries.formula.function.text;
  18. import org.pentaho.reporting.libraries.formula.function.AbstractFunctionDescription;
  19. import org.pentaho.reporting.libraries.formula.function.FunctionCategory;
  20. import org.pentaho.reporting.libraries.formula.typing.Type;
  21. import org.pentaho.reporting.libraries.formula.typing.coretypes.AnyType;
  22. import org.pentaho.reporting.libraries.formula.typing.coretypes.TextType;
  23. /**
  24. * Describes TFunction function.
  25. * @see TFunction
  26. *
  27. * @author Cedric Pronzato
  28. *
  29. */
  30. public class TFunctionDescription extends AbstractFunctionDescription
  31. {
  32. private static final long serialVersionUID = 7982024479324130664L;
  33. public TFunctionDescription()
  34. {
  35. super("T", "org.pentaho.reporting.libraries.formula.function.text.T-Function");
  36. }
  37. public FunctionCategory getCategory()
  38. {
  39. return TextFunctionCategory.CATEGORY;
  40. }
  41. public int getParameterCount()
  42. {
  43. return 1;
  44. }
  45. public Type getParameterType(final int position)
  46. {
  47. return AnyType.TYPE;
  48. }
  49. public Type getValueType()
  50. {
  51. return TextType.TYPE;
  52. }
  53. public boolean isParameterMandatory(final int position)
  54. {
  55. return true;
  56. }
  57. }