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

it.ssc.step.sort.SaveArrayOrderedToMemory Maven / Gradle / Ivy

Go to download

This is a JSR331 interface for SSC (Software for the Calculation of the Simplex) is a java library for solving linear programming problems v. 3.0.1. SSC was designed and developed by Stefano Scarioli.

The newest version!
package it.ssc.step.sort;

import it.ssc.dynamic_source.DynamicClassSortInterface;

public class SaveArrayOrderedToMemory implements MyIterator {
	private DynamicClassSortInterface[] array;
	private int index=0;
	
	public boolean hasNext() {
		if(this.index < array.length) return true;
		else return false;
	}
	
	public DynamicClassSortInterface next() {
		return array[this.index++];
	}
	
	
	public void close() {
		array=null;
	}
	
	public void saveToMemory(DynamicClassSortInterface[] array) {
		this.array=array;
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy