org.ttzero.excel.reader.AllInOneCell Maven / Gradle / Ivy
/*
* Copyright (c) 2019-2020, [email protected] All Rights Reserved.
*
* 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.
*/
package org.ttzero.excel.reader;
import org.ttzero.excel.entity.e3.BIFF8Cell;
import org.ttzero.excel.entity.e3.Formula;
import org.ttzero.excel.entity.e3.MulBlank;
import org.ttzero.excel.entity.e3.MulRK;
import org.ttzero.excel.entity.e3.RKValue;
import org.ttzero.excel.entity.e3.enums.ErrorCodeEnum;
/**
* @author guanquan.wang at 2019-04-18 21:47
*/
public class AllInOneCell extends BIFF8Cell {
// 5.65 LABELSST 4 bytes
// Index into SST record (➜5.100)
public int sstValue;
// 5.87 RK 4 bytes
public RKValue rkValue;
// 5.89 RSTRING
// Unformatted Unicode string, 16-bit string length (➜2.5.3)
// 5.63 LABEL
// Unicode string, 16-bit string length (➜2.5.3)
public String sValue;
// 5.71 NUMBER 8 bytes
// IEEE 754 floating-point value (64-bit double precision)
public double dValue;
// 5.10 BOOLERR
public boolean bValue;
public ErrorCodeEnum error;
// 5.7 BLANK
public boolean blank;
// 5.68 MULBLANK – Multiple BLANK
public MulBlank mulBlank;
// 5.69 MULRK – Multiple RK
public MulRK mulRK;
// 5.50 FORMULA
public Formula formula;
public RKValue getOrNewRKValue() {
return rkValue != null ? rkValue : (rkValue = new RKValue());
}
public MulBlank getOrNewMulBlank() {
return mulBlank != null ? mulBlank : (mulBlank = new MulBlank());
}
public MulRK getOrNewMulRK() {
return mulRK != null ? mulRK : (mulRK = new MulRK());
}
public Formula getOrNewFormula() {
return formula != null ? formula : (formula = new Formula());
}
/**
* Clear non-shared property
*/
public void clear() {
error = null;
}
}