Android
android.webkit
public class

android.webkit.WebBackForwardList

java.lang.Object
android.webkit.WebBackForwardList Serializable Cloneable

This class contains the back/forward list for a WebView. WebView.copyBackForwardList() will return a copy of this class used to inspect the entries in the list.

Summary

Public Methods

  synchronized        int  getCurrentIndex()
Get the index of the current history item.
  synchronized        WebHistoryItem  getCurrentItem()
Return the current history item.
  synchronized        WebHistoryItem  getItemAtIndex(int index)
Get the history item at the given index.
  synchronized        int  getSize()
Get the total size of the back/forward list.

Protected Methods

  synchronized        WebBackForwardList  clone()
Clone the entire object to be used in the UI thread by clients of WebView.
Methods inherited from class java.lang.Object

Details

Public Methods

public synchronized int getCurrentIndex()

Get the index of the current history item. This index can be used to directly index into the array list.

Returns

  • The current index from 0...n or -1 if the list is empty.

public synchronized WebHistoryItem getCurrentItem()

Return the current history item. This method returns null if the list is empty.

Returns

  • The current history item.

public synchronized WebHistoryItem getItemAtIndex(int index)

Get the history item at the given index. The index range is from 0...n where 0 is the first item and n is the last item.

Parameters

index The index to retrieve.

public synchronized int getSize()

Get the total size of the back/forward list.

Returns

  • The size of the list.

Protected Methods

protected synchronized WebBackForwardList clone()

Clone the entire object to be used in the UI thread by clients of WebView. This creates a copy that should never be modified by any of the webkit package classes.

Returns

  • Object a shallow copy of this object.
Copyright 2007 Google Inc. Build 0.9_r1-98467 - 14 Aug 2008 18:48