import java.lang.Object; public class Path { private Position[] Positions; private int size; private int count; public Path(int _size) { size = _size; Positions = new Position[size]; for (int c=0; c= 0) && (_index < size) ) return Positions[_index]; else return null; } public synchronized Position Last() { return Get(count - 1); } public synchronized Position BeforeLast() { return Get(count - 2); } public synchronized int Count() { return count; } public synchronized int Size() { return size; } public synchronized boolean Full() { return (count == size); } public synchronized boolean Empty() { return (count == 0); } }