2002-01-30 21:22:28 -05:00
|
|
|
/* ====================================================================
|
2004-08-23 04:52:54 -04:00
|
|
|
Copyright 2003-2004 Apache Software Foundation
|
2004-04-09 09:05:39 -04:00
|
|
|
|
|
|
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
you may not use this file except in compliance with the License.
|
|
|
|
You may obtain a copy of the License at
|
|
|
|
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
See the License for the specific language governing permissions and
|
|
|
|
limitations under the License.
|
|
|
|
==================================================================== */
|
2002-01-30 21:22:28 -05:00
|
|
|
|
|
|
|
package org.apache.poi.hssf.record.formula;
|
|
|
|
|
2004-08-23 04:52:54 -04:00
|
|
|
|
2002-04-23 19:56:46 -04:00
|
|
|
|
2002-01-30 21:22:28 -05:00
|
|
|
/**
|
|
|
|
* defines a Ptg that is an operation instead of an operand
|
|
|
|
* @author andy
|
|
|
|
*/
|
|
|
|
|
2002-04-23 19:56:46 -04:00
|
|
|
public abstract class OperationPtg extends Ptg
|
2002-01-30 21:22:28 -05:00
|
|
|
{
|
|
|
|
public final static int TYPE_UNARY = 0;
|
|
|
|
public final static int TYPE_BINARY = 1;
|
|
|
|
public final static int TYPE_FUNCTION = 2;
|
|
|
|
|
2002-04-23 19:56:46 -04:00
|
|
|
public abstract int getType();
|
2002-04-27 10:07:53 -04:00
|
|
|
|
2002-04-30 19:22:27 -04:00
|
|
|
/**
|
|
|
|
* returns a string representation of the operations
|
|
|
|
* the length of the input array should equal the number returned by
|
2002-05-01 05:29:46 -04:00
|
|
|
* @see #getNumberOfOperands
|
2002-04-30 19:22:27 -04:00
|
|
|
*
|
|
|
|
*/
|
2002-04-27 10:07:53 -04:00
|
|
|
public abstract String toFormulaString(String[] operands);
|
|
|
|
|
2002-04-30 19:22:27 -04:00
|
|
|
/**
|
|
|
|
* The number of operands expected by the operations
|
|
|
|
*/
|
2002-04-23 19:56:46 -04:00
|
|
|
public abstract int getNumberOfOperands();
|
|
|
|
|
2002-05-27 17:00:12 -04:00
|
|
|
public byte getDefaultOperandClass() {return Ptg.CLASS_VALUE;}
|
|
|
|
|
2002-01-30 21:22:28 -05:00
|
|
|
}
|