Here you can find the source of getCurrentElement(ListIterator
public static <E> E getCurrentElement(ListIterator<E> listIterator)
//package com.java2s; /******************************************************************************* * Copyright (c) 2007 Bruno Medeiros and other Contributors. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors:/* www. j a va 2 s . c om*/ * Bruno Medeiros - initial implementation *******************************************************************************/ import java.util.ListIterator; public class Main { /** @return the element the given listIterator currently refers to. (uses #previous and #next) */ public static <E> E getCurrentElement(ListIterator<E> listIterator) { listIterator.previous(); return listIterator.next(); } }