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

org.jpmml.evaluator.TableUtil Maven / Gradle / Ivy

There is a newer version: 1.7.2
Show newest version
package org.jpmml.evaluator;

import java.util.List;

class TableUtil {

	private TableUtil(){
	}

	static
	 E get(List values, int index){

		if(index < values.size()){
			return values.get(index);
		}

		return null;
	}

	static
	 E set(List values, int index, E value){

		if(index < values.size()){
			return values.set(index, value);
		} else

		{
			TableUtil.ensureSize(values, index);

			values.add(value);

			return null;
		}
	}

	static
	 List ensureSize(List values, int size){

		while(values.size() < size){
			values.add(null);
		}

		return values;
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy