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

com.ociweb.pronghorn.util.primitive.IntArrayHolder Maven / Gradle / Ivy

Go to download

Ring buffer based queuing utility for applications that require high performance and/or a small footprint. Well suited for embedded and stream based processing.

The newest version!
package com.ociweb.pronghorn.util.primitive;

public class IntArrayHolder {

	public int[] data;
	
	public IntArrayHolder(int initSize) {
		data = new int[initSize];		
	}
	
	public void growIfNeeded(int index) {
		if (index >= data.length) {
			int[] temp = new int[index*2];
			System.arraycopy(data, 0, temp, 0, data.length);
			data = temp;			
		}
	}
	
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy