@Test public void firstCommandIsNull_ForEmptyQueue() { CommandQueue commandQueue = new CommandQueue(); assertNull(commandQueue.first()); }
public Pair<Command, Integer> first() { if (size() == 0) { return null; } return queue.peek(); }
CommandQueue implements Iterable<Pair<Command, Integer>> { public Pair<Command, Integer> first() { if (size() == 0) { return null; } return queue.peek(); } }
CommandQueue implements Iterable<Pair<Command, Integer>> { public Pair<Command, Integer> first() { if (size() == 0) { return null; } return queue.peek(); } CommandQueue();  CommandQueue(CommandQueue commandQueue); }
CommandQueue implements Iterable<Pair<Command, Integer>> { public Pair<Command, Integer> first() { if (size() == 0) { return null; } return queue.peek(); } CommandQueue();  CommandQueue(CommandQueue commandQueue); void queue(Command command, Integer trackId); Pair<Command, Integer> dequeue(); @Override Iterator<Pair<Command, Integer>> iterator(); Pair<Command, Integer> first(); Pair<Command, Integer> last(); void clear(); int size(); }
CommandQueue implements Iterable<Pair<Command, Integer>> { public Pair<Command, Integer> first() { if (size() == 0) { return null; } return queue.peek(); } CommandQueue();  CommandQueue(CommandQueue commandQueue); void queue(Command command, Integer trackId); Pair<Command, Integer> dequeue(); @Override Iterator<Pair<Command, Integer>> iterator(); Pair<Command, Integer> first(); Pair<Command, Integer> last(); void clear(); int size();  }