ArrayDeque peek - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for ArrayDeque peek method.

This code example shows how to use the following methods:add, peek, size, toArray
5
CodeRank
This code example shows how to use the following methods:peek, removeFirst
		return true; 
	} 
 
	public ISchedulable dequeue() { 
		ISchedulable event; 
		event = mData.peek(); 
		if(event == null) { 
			return event; 
		} 
 
		event = mData.removeFirst(); 
 
		return event; 
 
	} 
 
	public ISchedulable peek() { 
		return mData.peek(); 
	} 
 
5
CodeRank
This code example shows how to use the following methods:peek
	 * Retrieves, but does not remove the first key 
	 *  
	 * @return the first key 
	 */ 
	public K peekKey() { 
		K key = this.keys.peek();
 
		//assert key != null; 
		return key;
	} 
 
	/** 
	 * Retrieves and remove the first key 
	 *  
	 * @return the first key 
	 */ 
	public K removeKey() { 
		K key = this.keys.remove();
		//assert key != null; 
		return key;
4
CodeRank
peek Method Overview
Retrieves, but does not remove, the head of the queue represented by this deque, or returns null if this deque is empty.
See Code Examples for other Java 8 ArrayDeque Methods: