public Object tryGet()
{
Object o = null;
Monitor.Enter(this);
try
{
if (head != null)
{
o = head.getContents();
head = head.getNext();
count--;
if (head == null)
{
tail = null;
count = 0;
}
}
}
finally
{
Monitor.Exit(this);
}
return o;
}