![JAR search and dependency download from the Maven repository](/logo.png)
org.supercsv.ext.cellprocessor.ConvertNullToNext Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of super-csv-annotation Show documentation
Show all versions of super-csv-annotation Show documentation
CSVのJavaライブラリであるSuperCSVに、アノテーション機能を追加したライブラリです。
/*
* ConvertNullToNext.java
* created in 2013/03/12
*
* (C) Copyright 2003-2013 GreenDay Project. All rights reserved.
*/
package org.supercsv.ext.cellprocessor;
import org.supercsv.cellprocessor.CellProcessorAdaptor;
import org.supercsv.cellprocessor.ift.BoolCellProcessor;
import org.supercsv.cellprocessor.ift.CellProcessor;
import org.supercsv.cellprocessor.ift.DateCellProcessor;
import org.supercsv.cellprocessor.ift.DoubleCellProcessor;
import org.supercsv.cellprocessor.ift.LongCellProcessor;
import org.supercsv.cellprocessor.ift.StringCellProcessor;
import org.supercsv.util.CsvContext;
/**
*
*
* @author T.TSUCHIE
*
*/
public class ConvertNullToNext extends CellProcessorAdaptor implements BoolCellProcessor, DateCellProcessor,
DoubleCellProcessor, LongCellProcessor, StringCellProcessor {
protected final Object returnValue;
public ConvertNullToNext(final Object returnValue) {
super();
this.returnValue = returnValue;
}
public ConvertNullToNext(final Object returnValue, final CellProcessor next) {
super(next);
this.returnValue = returnValue;
}
/**
* {@inheritDoc}
*/
@Override
public Object execute(final Object value, final CsvContext context) {
if( value == null ) {
return next.execute(returnValue, context);
}
return next.execute(value, context);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy