public abstract class PasswordDictionary extends DictionaryBase implements Iterable<String>
Learn more
ErrorOccurred
Modifier | Constructor and Description |
---|---|
protected |
PasswordDictionary(String filePath,
boolean saveOnChange)
Initializes a new instance of the
PasswordDictionary class. |
Modifier and Type | Method and Description |
---|---|
abstract void |
add(String filePath,
String password)
Adds a password for a document to the dictionary.
|
abstract void |
clear()
Removes all passwords from this
PasswordDictionary object. |
abstract boolean |
contains(String filePath)
Determines whether the dictionary contains a password for the specified document.
|
abstract int |
getCount()
Gets the number of elements contained in the dictionary.
|
abstract String |
getPassword(String filePath)
Gets the password for the file.
|
abstract Iterator<String> |
iterator()
Returns an iterator that iterates through the collection.
|
abstract boolean |
remove(String filePath)
Removes a password of the specified document from the dictionary.
|
copyFrom, export, exportDictionary, getFilePath, getFilePathStatic, getStandardFileName, getStandardFileNameStatic, import_, importDictionary, load, loadDefault, loadInternalStatic, merge, mergeInternalStatic, notifyChanged, save, setFilePath
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
protected PasswordDictionary(String filePath, boolean saveOnChange)
Initializes a new instance of the PasswordDictionary
class.
filePath
- The file name.saveOnChange
- The save on change flag.public abstract int getCount()
Gets the number of elements contained in the dictionary.
public abstract String getPassword(String filePath)
Gets the password for the file.
filePath
- The file path.public abstract void clear()
Removes all passwords from this PasswordDictionary
object.
public abstract boolean contains(String filePath)
Determines whether the dictionary contains a password for the specified document.
filePath
- The document file path.true
if the dictionary contains a password for the document; otherwise, false
.public abstract void add(String filePath, String password)
Adds a password for a document to the dictionary.
filePath
- The document file path.password
- The document password.public abstract boolean remove(String filePath)
Removes a password of the specified document from the dictionary.
filePath
- The document file path.true
if the password was successfully removed; otherwise, false
.
This method also returns false
if filePath
was not found in the dictionary.