public class LocalStorage extends Object
Constructor and Description |
---|
LocalStorage() |
Modifier and Type | Method and Description |
---|---|
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.
|
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.Copyright © 2013-2015 JBoss, a division of Red Hat. All Rights Reserved.