|
Errai 3.0.1-SNAPSHOT | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.errai.jpa.client.local.backend.LocalStorage
public class LocalStorage
Provides access to the methods of the standard Window.localStorage object available in most browsers. Works much like java.util.Map, but the contents of the map persist indefinitely within the browser, like cookies do (even if the page is closed and reopened days, weeks, or years later).
Constructor Summary | |
---|---|
LocalStorage()
|
Method Summary | |
---|---|
static void |
forEachKey(EntryVisitor entryVisitor)
Invokes the given entry visitor on each key/value pair in this entire storage backend. |
static String |
get(String key)
Retrieves the value associated with the given key. |
static void |
put(String key,
String value)
Puts the given key-value mapping into storage, replacing any previously existing mapping. |
static String |
remove(String key)
Removes the key-value mapping associated with the given key, if any. |
static void |
removeAll()
Removes all key-value mappings from storage. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LocalStorage()
Method Detail |
---|
public static void put(String key, String value)
key
- The key for the mapping. Must not be null.value
- The value to associate with key. Null is permitted.public static String get(String key)
key
- The key for the mapping. Must not be null.
public static String remove(String key)
key
- The key for the mapping. Must not be null.
public static void removeAll()
public static void forEachKey(EntryVisitor entryVisitor)
entryVisitor
- The visitor that will act on each key/value pair.
|
Errai 3.0.1-SNAPSHOT | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |