Skip to content

Instantly share code, notes, and snippets.

@izmajlowiczl
Created January 4, 2017 20:52
Show Gist options
  • Select an option

  • Save izmajlowiczl/1ec9337cf4192e646af99e116ccab836 to your computer and use it in GitHub Desktop.

Select an option

Save izmajlowiczl/1ec9337cf4192e646af99e116ccab836 to your computer and use it in GitHub Desktop.
public interface WalletsStorage {
/**
* List all stored {@link Wallet}s. Result is null safe
*
* @return Collection of all stored Wallets or Collections.emptyList() for empty result.
*/
Collection<Wallet> list();
/**
* Stores {@link Wallet} object.
*
* @param wallet There is no validation of object performed. Check for nulls or invalid values before using.
* @throws IllegalStateException In case of storing duplicate.
*/
void insert(Wallet wallet) throws IllegalStateException;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment