Code example for Queue

Methods: element

0
    return delegate().peek();
  } 
 
  @Override 
  public E element() { 
    return delegate().element();
  } 
 
  /** 
   * A sensible definition of {@link #offer} in terms of {@link #add}. If you 
   * override {@link #add}, you may wish to override {@link #offer} to forward 
   * to this implementation. 
   *  
   * @since 7.0 
   */ 
  @Beta protected boolean standardOffer(E e) {
    try { 
      return add(e);
    } catch (IllegalStateException caught) {
      return false;