You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

ExcelAntEvaluationResult.java 3.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. /* ====================================================================
  2. Licensed to the Apache Software Foundation (ASF) under one or more
  3. contributor license agreements. See the NOTICE file distributed with
  4. this work for additional information regarding copyright ownership.
  5. The ASF licenses this file to You under the Apache License, Version 2.0
  6. (the "License"); you may not use this file except in compliance with
  7. the License. You may obtain a copy of the License at
  8. http://www.apache.org/licenses/LICENSE-2.0
  9. Unless required by applicable law or agreed to in writing, software
  10. distributed under the License is distributed on an "AS IS" BASIS,
  11. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. See the License for the specific language governing permissions and
  13. limitations under the License.
  14. ==================================================================== */
  15. package org.apache.poi.ss.excelant.util;
  16. /**
  17. * A simple class that encapsulates information about a cell evaluation
  18. * from POI.
  19. *
  20. * @author Jon Svede ( jon [at] loquatic [dot] com )
  21. * @author Brian Bush ( brian [dot] bush [at] nrel [dot] gov )
  22. *
  23. */
  24. public class ExcelAntEvaluationResult {
  25. /**
  26. * This boolean flag is used to determine if the evaluation completed
  27. * without error. This alone doesn't ensure that the evaluation was
  28. * sucessful.
  29. */
  30. private boolean evaluationCompletedWithError ;
  31. /**
  32. * This boolean flag is used to determine if the result was within
  33. * the specified precision.
  34. */
  35. private boolean didPass ;
  36. /**
  37. * This is the actual value returned from the evaluation.
  38. */
  39. private double returnValue ;
  40. /**
  41. * Any error message String values that need to be returned.
  42. */
  43. private String errorMessage ;
  44. /**
  45. * Stores the absolute value of the delta for this evaluation.
  46. */
  47. private double actualDelta ;
  48. /**
  49. * This stores the fully qualified cell name (sheetName!cellId).
  50. */
  51. private String cellName ;
  52. public ExcelAntEvaluationResult( boolean completedWithError,
  53. boolean passed,
  54. double retValue,
  55. String errMessage,
  56. double delta,
  57. String cellId ) {
  58. evaluationCompletedWithError = completedWithError;
  59. didPass = passed;
  60. returnValue = retValue;
  61. errorMessage = errMessage;
  62. actualDelta = delta ;
  63. cellName = cellId ;
  64. }
  65. public double getReturnValue() {
  66. return returnValue;
  67. }
  68. public String getErrorMessage() {
  69. return errorMessage;
  70. }
  71. public boolean didTestPass() {
  72. return didPass ;
  73. }
  74. public boolean evaluationCompleteWithError() {
  75. return evaluationCompletedWithError ;
  76. }
  77. public double getDelta() {
  78. return actualDelta ;
  79. }
  80. public String getCellName() {
  81. return cellName ;
  82. }
  83. @Override
  84. public String toString() {
  85. return "ExcelAntEvaluationResult [evaluationCompletedWithError="
  86. + evaluationCompletedWithError + ", didPass=" + didPass
  87. + ", returnValue=" + returnValue + ", errorMessage="
  88. + errorMessage + ", actualDelta=" + actualDelta + ", cellName="
  89. + cellName + "]";
  90. }
  91. }