All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.meliorbis.numerics.io.NOOPWriterFactory Maven / Gradle / Ivy

Go to download

A library for working with large multi-dimensional arrays and the functions they represent

There is a newer version: 1.2
Show newest version
package com.meliorbis.numerics.io;

import java.io.File;
import java.io.IOException;
import java.util.Map;

import com.meliorbis.numerics.generic.MultiDimensionalArray;

/**
 * Writer factory for writers that write nothing. For testing
 * 
 * @author Tobias Grasl
 */
public class NOOPWriterFactory implements NumericsWriterFactory
{
    private static final NumericsWriter NOOP_WRITER = new NumericsWriter(){

        @Override
        public void writeArray(String name_, MultiDimensionalArray array_) throws IOException
        {

        }

        @Override
        public void writeArrays(Map> arrays_) throws IOException
        {

        }

        @Override
        public void writeStructure(String name_, Map> arrays_) throws IOException
        {

        }

        @Override
        public void close() throws IOException
        {

        }
    };

    @Override
    public NumericsWriter create(File file_)
    {
        return NOOP_WRITER;
    }

    @Override
	public String defaultExtension()
	{
		return "";
	}   
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy