Package com.zopim.android.sdk.store
Enum Storage
- java.lang.Object
-
- java.lang.Enum<Storage>
-
- com.zopim.android.sdk.store.Storage
-
-
Enum Constant Summary
Enum Constants Enum Constant and Description INSTANCE
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description void
clearAll()
Clears all data from the storage.static void
init(Context context)
Initializes the storage.static MachineIdStorage
machineId()
Provides an instance ofMachineIdStorage
static Storage
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static Storage[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.static VisitorInfoStorage
visitorInfo()
Provides an instance ofVisitorInfoStorage
-
-
-
Enum Constant Detail
-
INSTANCE
public static final Storage INSTANCE
-
-
Method Detail
-
values
public static Storage[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (Storage c : Storage.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static Storage valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
init
public static void init(Context context)
Initializes the storage. This must be called first in order for the storage to work.- Parameters:
context
- A context which will be used to initialise the storage
-
machineId
public static MachineIdStorage machineId()
Provides an instance ofMachineIdStorage
If
Storage
has not been initialized first this will return dummy storage implementation.- Returns:
- machine id storage
-
visitorInfo
public static VisitorInfoStorage visitorInfo()
Provides an instance ofVisitorInfoStorage
If
Storage
has not been initialized first this will return mocked storage implementation.- Returns:
- visitor info storage
-
clearAll
public void clearAll()
Clears all data from the storage.This will clear the data in
MachineIdStorage
andVisitorInfoStorage
implementations
-
-