package speiger.src.coreengine.utils.collections.managers.fixed;

public class FixedSlot implements Comparable<FixedSlot>
{
	int index;
	int data;
	
	public void set(int data, int index)
	{
		this.data = data;
		this.index = index;
	}
	
	public boolean isNext(FixedSlot next)
	{
		return next.index - index == 1;
	}
	
	@Override
	public String toString()
	{
		return "DataSlot[Index="+index+", Data="+data+"]";
	}
	
	@Override
	public int compareTo(FixedSlot o)
	{
		return Integer.compareUnsigned(index, o.index);
	}

	public int getData()
	{
		return data;
	}
	
	public int getIndex()
	{
		return index;
	}
}