Java Code Examples for com.alibaba.excel.metadata.CellData#getBooleanValue()

The following examples show how to use com.alibaba.excel.metadata.CellData#getBooleanValue() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: LongBooleanConverter.java    From easyexcel with Apache License 2.0 5 votes vote down vote up
@Override
public Long convertToJavaData(CellData cellData, ExcelContentProperty contentProperty,
    GlobalConfiguration globalConfiguration) {
    if (cellData.getBooleanValue()) {
        return ONE;
    }
    return ZERO;
}
 
Example 2
Source File: IntegerBooleanConverter.java    From easyexcel with Apache License 2.0 5 votes vote down vote up
@Override
public Integer convertToJavaData(CellData cellData, ExcelContentProperty contentProperty,
    GlobalConfiguration globalConfiguration) {
    if (cellData.getBooleanValue()) {
        return ONE;
    }
    return ZERO;
}
 
Example 3
Source File: ByteBooleanConverter.java    From easyexcel with Apache License 2.0 5 votes vote down vote up
@Override
public Byte convertToJavaData(CellData cellData, ExcelContentProperty contentProperty,
    GlobalConfiguration globalConfiguration) {
    if (cellData.getBooleanValue()) {
        return ONE;
    }
    return ZERO;
}
 
Example 4
Source File: ShortBooleanConverter.java    From easyexcel with Apache License 2.0 5 votes vote down vote up
@Override
public Short convertToJavaData(CellData cellData, ExcelContentProperty contentProperty,
    GlobalConfiguration globalConfiguration) {
    if (cellData.getBooleanValue()) {
        return ONE;
    }
    return ZERO;
}
 
Example 5
Source File: FloatBooleanConverter.java    From easyexcel with Apache License 2.0 5 votes vote down vote up
@Override
public Float convertToJavaData(CellData cellData, ExcelContentProperty contentProperty,
    GlobalConfiguration globalConfiguration) {
    if (cellData.getBooleanValue()) {
        return ONE;
    }
    return ZERO;
}
 
Example 6
Source File: BigDecimalBooleanConverter.java    From easyexcel with Apache License 2.0 5 votes vote down vote up
@Override
public BigDecimal convertToJavaData(CellData cellData, ExcelContentProperty contentProperty,
    GlobalConfiguration globalConfiguration) {
    if (cellData.getBooleanValue()) {
        return BigDecimal.ONE;
    }
    return BigDecimal.ZERO;
}
 
Example 7
Source File: DoubleBooleanConverter.java    From easyexcel with Apache License 2.0 5 votes vote down vote up
@Override
public Double convertToJavaData(CellData cellData, ExcelContentProperty contentProperty,
    GlobalConfiguration globalConfiguration) {
    if (cellData.getBooleanValue()) {
        return ONE;
    }
    return ZERO;
}
 
Example 8
Source File: BooleanBooleanConverter.java    From easyexcel with Apache License 2.0 4 votes vote down vote up
@Override
public Boolean convertToJavaData(CellData cellData, ExcelContentProperty contentProperty,
    GlobalConfiguration globalConfiguration) {
    return cellData.getBooleanValue();
}