Interface PasswordAliasStore
If the implementation holds the aliases and passwords in memory, it handles loading and saving the in-memory contents
from and to persistent storage, at the discretion of the implementer. For example, loading would typically happen
when the password alias store implementation is first instantiated, although an implementation could choose to load
lazily on first read. Saving is at the discretion of the implementer as well, although to maximize reliability the
implementation should persist changes as they occur. The invalid input: ') methods can help optimize that.
@author tjquinn'
-
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
Deletes all password aliases from the store.boolean
containsKey
(String alias) Reports whether the store contains the specified alias.char[]
Returns the password associated with the specified alias.boolean
isEmpty()
Reports whether the alias store is empty.keys()
Returns an Iterator over aliases present in the alias store.void
Insert a new alias with the specified password, or assigns a new password to an existing alias.void
Adds a group of alias/password pairs in a single operation.void
putAll
(PasswordAliasStore otherStore) Adds all alias/password pairs from the specified store to this store.void
Removes the specified alias (and the associated password) from the password alias store.int
size()
Reports the number of aliases present in the store.
-
Method Details
-
containsKey
Reports whether the store contains the specified alias.- Parameters:
alias
- the alias to check for- Returns:
- true if the alias appears in the store; false otherwise
-
get
Returns the password associated with the specified alias.- Parameters:
alias
- the alias of interest- Returns:
- the password for that alias, if the store contains the alias; null otherwise
-
isEmpty
boolean isEmpty()Reports whether the alias store is empty.- Returns:
-
keys
Returns an Iterator over aliases present in the alias store.- Returns:
-
size
int size()Reports the number of aliases present in the store.- Returns:
-
clear
void clear()Deletes all password aliases from the store. -
put
Insert a new alias with the specified password, or assigns a new password to an existing alias.- Parameters:
alias
- the alias to create or reassignpassword
- the password to be associated with the alias
-
putAll
Adds all alias/password pairs from the specified store to this store.- Parameters:
otherStore
- the alias store from which to get entries
-
putAll
Adds a group of alias/password pairs in a single operation.Callers might prefer to invoke this method once rather than invoking
invalid input: ') repeatedly, for example if an implementation persists each change as it is made. @param settings the alias/password pairs to add'
-
remove
Removes the specified alias (and the associated password) from the password alias store.- Parameters:
alias
- the alias to be removed
-