PageRenderTime 38ms CodeModel.GetById 15ms RepoModel.GetById 0ms app.codeStats 1ms

/libformula-1.1.3/source/org/pentaho/reporting/libraries/formula/function/math/EvenFunctionDescription.java

#
Java | 66 lines | 33 code | 10 blank | 23 comment | 0 complexity | 1b9ab0de9c1aef9942068e2ee0e1f1fb 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.math;
  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.NumberType;
  22. /**
  23. * Describes EvenFunction function.
  24. * @see EvenFunction
  25. *
  26. * @author Cedric Pronzato
  27. *
  28. */
  29. public class EvenFunctionDescription extends AbstractFunctionDescription
  30. {
  31. private static final long serialVersionUID = 7912737754606057685L;
  32. public EvenFunctionDescription()
  33. {
  34. super("EVEN", "org.pentaho.reporting.libraries.formula.function.math.Even-Function");
  35. }
  36. public FunctionCategory getCategory()
  37. {
  38. return MathFunctionCategory.CATEGORY;
  39. }
  40. public int getParameterCount()
  41. {
  42. return 1;
  43. }
  44. public Type getParameterType(final int position)
  45. {
  46. return NumberType.GENERIC_NUMBER;
  47. }
  48. public Type getValueType()
  49. {
  50. return NumberType.GENERIC_NUMBER;
  51. }
  52. public boolean isParameterMandatory(final int position)
  53. {
  54. return true;
  55. }
  56. }