KeyValueStore enhancements

This commit is contained in:
ismailgulek
2020-11-05 15:08:42 +03:00
parent c9295590f5
commit db2a3c2101
5 changed files with 95 additions and 20 deletions
@@ -24,12 +24,17 @@ protocol KeyValueStore {
func set(_ value: String?, forKey key: KeyValueStoreKey) throws
func set(_ value: Bool?, forKey key: KeyValueStoreKey) throws
func set(_ value: Int?, forKey key: KeyValueStoreKey) throws
func set(_ value: UInt?, forKey key: KeyValueStoreKey) throws
// getters
func data(forKey key: KeyValueStoreKey) throws -> Data?
func string(forKey key: KeyValueStoreKey) throws -> String?
func bool(forKey key: KeyValueStoreKey) throws -> Bool?
func integer(forKey key: KeyValueStoreKey) throws -> Int?
func unsignedInteger(forKey key: KeyValueStoreKey) throws -> UInt?
// checkers
func containsObject(forKey key: KeyValueStoreKey) -> Bool
// remove
func removeObject(forKey key: KeyValueStoreKey) throws