code: private void readObject(java.io.ObjectInputStream s)
          throws java.io.IOException, ClassNotFoundException {
          s.defaultReadObject();
  
          // Read in elements until trailing null sentinel found
          Node<E> h = null, t = null;
          for (Object item; (item = s.readObject()) != null; ) {
              @SuppressWarnings("unchecked")
              Node<E> newNode = new Node<E>((E) item);
              if (h == null)
                  h = t = newNode;
              else {
                  t.lazySetNext(newNode);
                  newNode.lazySetPrev(t);
                  t = newNode;
              }
          }
          initHeadTail(h, t);
      }
docs: Reconstitutes this deque from a stream (that is, deserializes it).
  @param s the stream
  @throws ClassNotFoundException if the class of a serialized object
  could not be found
  @throws java.io.IOException if an I/O error occurs