Stay organized with collections
Save and categorize content based on your preferences.
WebBackForwardList
public
abstract
class
WebBackForwardList
extends Object
implements
Cloneable,
Serializable
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
Protected methods |
abstract
WebBackForwardList
|
clone()
Clone the entire object to be used in the UI thread by clients of
WebView.
|
Inherited methods |
From class
java.lang.Object
Object
|
clone()
Creates and returns a copy of this object.
|
boolean
|
equals(Object obj)
Indicates whether some other object is "equal to" this one.
|
void
|
finalize()
Called by the garbage collector on an object when garbage collection
determines that there are no more references to the object.
|
final
Class<?>
|
getClass()
Returns the runtime class of this Object .
|
int
|
hashCode()
Returns a hash code value for the object.
|
final
void
|
notify()
Wakes up a single thread that is waiting on this object's
monitor.
|
final
void
|
notifyAll()
Wakes up all threads that are waiting on this object's monitor.
|
String
|
toString()
Returns a string representation of the object.
|
final
void
|
wait(long timeoutMillis, int nanos)
Causes the current thread to wait until it is awakened, typically
by being notified or interrupted, or until a
certain amount of real time has elapsed.
|
final
void
|
wait(long timeoutMillis)
Causes the current thread to wait until it is awakened, typically
by being notified or interrupted, or until a
certain amount of real time has elapsed.
|
final
void
|
wait()
Causes the current thread to wait until it is awakened, typically
by being notified or interrupted.
|
|
Public constructors
WebBackForwardList
public WebBackForwardList ()
Public methods
getCurrentIndex
public abstract int getCurrentIndex ()
Get the index of the current history item. This index can be used to
directly index into the array list.
Returns |
int |
The current index from 0...n or -1 if the list is empty. |
getCurrentItem
public abstract WebHistoryItem getCurrentItem ()
Return the current history item. This method returns null
if the list is
empty.
getItemAtIndex
public abstract 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 |
int : The index to retrieve. |
getSize
public abstract int getSize ()
Get the total size of the back/forward list.
Returns |
int |
The size of the list. |
Protected methods
clone
protected abstract 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. On Android 4.4 and later there is no need to use
this, as the object is already a read-only copy of the internal state.
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-10 UTC."],[],[],null,["# WebBackForwardList\n\nAdded in [API level 1](/guide/topics/manifest/uses-sdk-element#ApiLevels) \nSummary: [Ctors](#pubctors) \\| [Methods](#pubmethods) \\| [Protected Methods](#promethods) \\| [Inherited Methods](#inhmethods) \n\nWebBackForwardList\n==================\n\n*** ** * ** ***\n\n[Kotlin](/reference/kotlin/android/webkit/WebBackForwardList \"View this page in Kotlin\") \\|Java\n\n\n`\npublic\n\n\nabstract\nclass\nWebBackForwardList\n`\n\n\n`\n\nextends `[Object](/reference/java/lang/Object)`\n\n\n`\n\n`\n\n\nimplements\n\n`[Cloneable](/reference/java/lang/Cloneable)`,\n\n`[Serializable](/reference/java/io/Serializable)`\n\n\n`\n\n|---|-----------------------------------|\n| [java.lang.Object](/reference/java/lang/Object) ||\n| ↳ | android.webkit.WebBackForwardList |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nThis class contains the back/forward list for a WebView.\nWebView.copyBackForwardList() will return a copy of this class used to\ninspect the entries in the list.\n\nSummary\n-------\n\n| ### Public constructors ||\n|-------------------------------------------------------------------------------------------------|---|\n| ` `[WebBackForwardList](/reference/android/webkit/WebBackForwardList#WebBackForwardList())`() ` |\n\n| ### Public methods ||\n|------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------|\n| ` abstract int` | ` `[getCurrentIndex](/reference/android/webkit/WebBackForwardList#getCurrentIndex())`() ` Get the index of the current history item. |\n| ` abstract `[WebHistoryItem](/reference/android/webkit/WebHistoryItem) | ` `[getCurrentItem](/reference/android/webkit/WebBackForwardList#getCurrentItem())`() ` Return the current history item. |\n| ` abstract `[WebHistoryItem](/reference/android/webkit/WebHistoryItem) | ` `[getItemAtIndex](/reference/android/webkit/WebBackForwardList#getItemAtIndex(int))`(int index) ` Get the history item at the given index. |\n| ` abstract int` | ` `[getSize](/reference/android/webkit/WebBackForwardList#getSize())`() ` Get the total size of the back/forward list. |\n\n| ### Protected methods ||\n|--------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` abstract `[WebBackForwardList](/reference/android/webkit/WebBackForwardList) | ` `[clone](/reference/android/webkit/WebBackForwardList#clone())`() ` Clone the entire object to be used in the UI thread by clients of WebView. |\n\n| ### Inherited methods |\n|-----------------------|---|\n| From class ` `[java.lang.Object](/reference/java/lang/Object)` ` |---------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ` `[Object](/reference/java/lang/Object) | ` `[clone](/reference/java/lang/Object#clone())`() ` Creates and returns a copy of this object. | | ` boolean` | ` `[equals](/reference/java/lang/Object#equals(java.lang.Object))`(`[Object](/reference/java/lang/Object)` obj) ` Indicates whether some other object is \"equal to\" this one. | | ` void` | ` `[finalize](/reference/java/lang/Object#finalize())`() ` Called by the garbage collector on an object when garbage collection determines that there are no more references to the object. | | ` final `[Class](/reference/java/lang/Class)`\u003c?\u003e` | ` `[getClass](/reference/java/lang/Object#getClass())`() ` Returns the runtime class of this `Object`. | | ` int` | ` `[hashCode](/reference/java/lang/Object#hashCode())`() ` Returns a hash code value for the object. | | ` final void` | ` `[notify](/reference/java/lang/Object#notify())`() ` Wakes up a single thread that is waiting on this object's monitor. | | ` final void` | ` `[notifyAll](/reference/java/lang/Object#notifyAll())`() ` Wakes up all threads that are waiting on this object's monitor. | | ` `[String](/reference/java/lang/String) | ` `[toString](/reference/java/lang/Object#toString())`() ` Returns a string representation of the object. | | ` final void` | ` `[wait](/reference/java/lang/Object#wait(long,%20int))`(long timeoutMillis, int nanos) ` Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed. | | ` final void` | ` `[wait](/reference/java/lang/Object#wait(long))`(long timeoutMillis) ` Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed. | | ` final void` | ` `[wait](/reference/java/lang/Object#wait())`() ` Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*. | ||\n\nPublic constructors\n-------------------\n\n### WebBackForwardList\n\n```\npublic WebBackForwardList ()\n```\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\nPublic methods\n--------------\n\n### getCurrentIndex\n\nAdded in [API level 1](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic abstract int getCurrentIndex ()\n```\n\nGet the index of the current history item. This index can be used to\ndirectly index into the array list.\n\n\u003cbr /\u003e\n\n| Returns ||\n|-------|-----------------------------------------------------------------|\n| `int` | The current index from 0...n or -1 if the list is empty. \u003cbr /\u003e |\n\n### getCurrentItem\n\nAdded in [API level 1](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic abstract WebHistoryItem getCurrentItem ()\n```\n\nReturn the current history item. This method returns `null` if the list is\nempty.\n\n\u003cbr /\u003e\n\n| Returns ||\n|------------------------------------------------------------|----------------------------------|\n| [WebHistoryItem](/reference/android/webkit/WebHistoryItem) | The current history item. \u003cbr /\u003e |\n\n### getItemAtIndex\n\nAdded in [API level 1](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic abstract WebHistoryItem getItemAtIndex (int index)\n```\n\nGet the history item at the given index. The index range is from 0...n\nwhere 0 is the first item and n is the last item.\n\n\u003cbr /\u003e\n\n| Parameters ||\n|---------|--------------------------------------|\n| `index` | `int`: The index to retrieve. \u003cbr /\u003e |\n\n| Returns ||\n|------------------------------------------------------------|--------|\n| [WebHistoryItem](/reference/android/webkit/WebHistoryItem) | \u003cbr /\u003e |\n\n### getSize\n\nAdded in [API level 1](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic abstract int getSize ()\n```\n\nGet the total size of the back/forward list.\n\n\u003cbr /\u003e\n\n| Returns ||\n|-------|------------------------------|\n| `int` | The size of the list. \u003cbr /\u003e |\n\nProtected methods\n-----------------\n\n### clone\n\nAdded in [API level 1](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\nprotected abstract WebBackForwardList clone ()\n```\n\nClone the entire object to be used in the UI thread by clients of\nWebView. This creates a copy that should never be modified by any of the\nwebkit package classes. On Android 4.4 and later there is no need to use\nthis, as the object is already a read-only copy of the internal state.\n\n\u003cbr /\u003e\n\n| Returns ||\n|--------------------------------------------------------------------|----------------------------------|\n| [WebBackForwardList](/reference/android/webkit/WebBackForwardList) | a clone of this instance. \u003cbr /\u003e |"]]