queue implementation in java