goog.storage.mechanism.IterableMechanism
Classgoog.storage.mechanism.IterableMechanism
> goog.storage.mechanism.Mechanism
goog.storage.mechanism.IterableMechanism()
Interface for all iterable storage mechanisms.
.__iterator__(opt_keys)
Returns an iterator that iterates over the elements in the storage. Will throw goog.iter.StopIteration after the last element.
opt_keys
{boolean
=}
goog.iter.Iterator
}
.clear()
Remove all key-value pairs. Could be overridden in a subclass, as the default implementation is not very efficient - it iterates over all keys.
.get(key)
Inherited from goog.storage.mechanism.Mechanism
.
Get the value stored under a key.
key
{string
}
string
}
.getCount()
Get the number of stored key-value pairs. Could be overridden in a subclass, as the default implementation is not very efficient - it iterates over all keys.
number
}
.remove(key)
Inherited from goog.storage.mechanism.Mechanism
.
Remove a key and its value.
key
{string
}
.set(key, value)
Inherited from goog.storage.mechanism.Mechanism
.
Set a value for a key.
key
{string
}
value
{string
}