public interface Storage
Modifier and Type | Method and Description |
---|---|
void |
clear()
Will empty all keys out of the storage.
|
java.lang.String |
getItem(java.lang.String key)
Returns the value for the given key which is currently stored in the storage
|
int |
getLength()
Returns an integer representing the number of data items stored in the Storage object.
|
java.lang.String |
key(int index)
It will return the name of the nth key in the storage.
|
void |
removeItem(java.lang.String key)
Removes the given key from the storage.
|
void |
setItem(java.lang.String key,
java.lang.String data)
The method will add that key to the storage, or update that key's value if it already exists
|
int getLength()
void clear()
java.lang.String getItem(java.lang.String key)
key
- The name of the key you want to retrieve the value of.java.lang.String key(int index)
index
- The number of the key you want to get the name of. This is a zero-based index.void removeItem(java.lang.String key)
key
- The name of the key you want to remove.void setItem(java.lang.String key, java.lang.String data)
key
- The key of the record which should be storeddata
- The data which should be stored for the given key.