Package org.mozilla.geckoview
Class GeckoSession.SessionState
Object
java.util.AbstractCollection<E>
java.util.AbstractList<E>
java.util.AbstractSequentialList<GeckoSession.HistoryDelegate.HistoryItem>
org.mozilla.geckoview.GeckoSession.SessionState
- All Implemented Interfaces:
Parcelable,Iterable<GeckoSession.HistoryDelegate.HistoryItem>,Collection<GeckoSession.HistoryDelegate.HistoryItem>,List<GeckoSession.HistoryDelegate.HistoryItem>,GeckoSession.HistoryDelegate.HistoryList
- Enclosing class:
- GeckoSession
@AnyThread
public static class GeckoSession.SessionState
extends AbstractSequentialList<GeckoSession.HistoryDelegate.HistoryItem>
implements GeckoSession.HistoryDelegate.HistoryList, Parcelable
Class representing a saved session state.
-
Nested Class Summary
Nested classes/interfaces inherited from interface android.os.Parcelable
Parcelable.ClassLoaderCreator<T extends Object>, Parcelable.Creator<T extends Object> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Parcelable.Creator<GeckoSession.SessionState>Creator used by the Android framework to deserialize SessionState from a Parcel.Fields inherited from class java.util.AbstractList
modCountFields inherited from interface android.os.Parcelable
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE -
Constructor Summary
ConstructorsConstructorDescriptionCopy constructor for SessionState. -
Method Summary
Modifier and TypeMethodDescriptionintbooleanstatic GeckoSession.SessionStatefromString(String value) Creates a new SessionState instance from a value previously returned bytoString().get(int index) intGet the current index in browser history.inthashCode()iterator()listIterator(int index) voidreadFromParcel(Parcel source) Reads session state from a Parcel.intsize()toString()voidwriteToParcel(Parcel dest, int flags) Methods inherited from class java.util.AbstractSequentialList
add, addAll, remove, setMethods inherited from class java.util.AbstractList
add, clear, indexOf, lastIndexOf, listIterator, removeRange, subListMethods inherited from class java.util.AbstractCollection
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArrayMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArrayMethods inherited from interface java.util.List
add, add, addAll, addAll, clear, contains, containsAll, indexOf, isEmpty, lastIndexOf, listIterator, remove, remove, removeAll, replaceAll, retainAll, set, sort, spliterator, subList, toArray, toArray
-
Field Details
-
CREATOR
Creator used by the Android framework to deserialize SessionState from a Parcel.
-
-
Constructor Details
-
SessionState
Copy constructor for SessionState.- Parameters:
state- the SessionState instance to duplicate.
-
-
Method Details
-
hashCode
public int hashCode()- Specified by:
hashCodein interfaceCollection<GeckoSession.HistoryDelegate.HistoryItem>- Specified by:
hashCodein interfaceList<GeckoSession.HistoryDelegate.HistoryItem>- Overrides:
hashCodein classAbstractList<GeckoSession.HistoryDelegate.HistoryItem>
-
equals
- Specified by:
equalsin interfaceCollection<GeckoSession.HistoryDelegate.HistoryItem>- Specified by:
equalsin interfaceList<GeckoSession.HistoryDelegate.HistoryItem>- Overrides:
equalsin classAbstractList<GeckoSession.HistoryDelegate.HistoryItem>
-
fromString
Creates a new SessionState instance from a value previously returned bytoString().- Parameters:
value- The serialized SessionState in String form.- Returns:
- A new SessionState instance if input is valid; otherwise null.
-
toString
- Overrides:
toStringin classAbstractCollection<GeckoSession.HistoryDelegate.HistoryItem>
-
describeContents
public int describeContents()- Specified by:
describeContentsin interfaceParcelable
-
writeToParcel
- Specified by:
writeToParcelin interfaceParcelable
-
readFromParcel
Reads session state from a Parcel. This may be called by AIDL code.- Parameters:
source- The Parcel containing the serialized session state.
-
get
- Specified by:
getin interfaceList<GeckoSession.HistoryDelegate.HistoryItem>- Overrides:
getin classAbstractSequentialList<GeckoSession.HistoryDelegate.HistoryItem>
-
iterator
- Specified by:
iteratorin interfaceCollection<GeckoSession.HistoryDelegate.HistoryItem>- Specified by:
iteratorin interfaceIterable<GeckoSession.HistoryDelegate.HistoryItem>- Specified by:
iteratorin interfaceList<GeckoSession.HistoryDelegate.HistoryItem>- Overrides:
iteratorin classAbstractSequentialList<GeckoSession.HistoryDelegate.HistoryItem>
-
listIterator
- Specified by:
listIteratorin interfaceList<GeckoSession.HistoryDelegate.HistoryItem>- Specified by:
listIteratorin classAbstractSequentialList<GeckoSession.HistoryDelegate.HistoryItem>
-
size
public int size()- Specified by:
sizein interfaceCollection<GeckoSession.HistoryDelegate.HistoryItem>- Specified by:
sizein interfaceList<GeckoSession.HistoryDelegate.HistoryItem>- Specified by:
sizein classAbstractCollection<GeckoSession.HistoryDelegate.HistoryItem>
-
getCurrentIndex
public int getCurrentIndex()Description copied from interface:GeckoSession.HistoryDelegate.HistoryListGet the current index in browser history.- Specified by:
getCurrentIndexin interfaceGeckoSession.HistoryDelegate.HistoryList- Returns:
- An int representing the current index in browser history.
-