io.baltoro.remote.CQueue Maven / Gradle / Ivy
package io.baltoro.remote;
public class CQueue
{
private int s;
private E[] e;
private int i = -1;
public CQueue(int s)
{
this.s = s;
e = (E[]) new Object[s];
}
public void add(E item)
{
i++;
if( i >= s)
{
i = 0;
}
e[i] = item;
}
public E get(int i)
{
int _i = s % i;
return e[_i];
}
public int getIndex()
{
return i;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy