Returns an iterator that iterates through the collection.
getCount()
public abstract int getCount()
Gets the number of elements contained in the dictionary.
Returns:
int - The number of elements contained in the dictionary.
getPassword(String filePath)
public abstract String getPassword(String filePath)
Gets the password for the file.
Parameters:
Parameter
Type
Description
filePath
java.lang.String
The file path.
Returns:
java.lang.String - The password for the file.
clear()
public abstract void clear()
Removes all passwords from this PasswordDictionary object.
contains(String filePath)
public abstract boolean contains(String filePath)
Determines whether the dictionary contains a password for the specified document.
Parameters:
Parameter
Type
Description
filePath
java.lang.String
The document file path.
Returns:
boolean - true if the dictionary contains a password for the document; otherwise, false .
add(String filePath, String password)
public abstract void add(String filePath, String password)
Adds a password for a document to the dictionary.
Parameters:
Parameter
Type
Description
filePath
java.lang.String
The document file path.
password
java.lang.String
The document password.
remove(String filePath)
public abstract boolean remove(String filePath)
Removes a password of the specified document from the dictionary.
Parameters:
Parameter
Type
Description
filePath
java.lang.String
The document file path.
Returns:
boolean - true if the password was successfully removed; otherwise, false . This method also returns false if filePath was not found in the dictionary.
iterator()
public abstract Iterator<String> iterator()
Returns an iterator that iterates through the collection.
Returns:
java.util.Iterator<java.lang.String> - An iterator that can be used to iterate through the collection.
Was this page helpful?
Any additional feedback you'd like to share with us?
Please tell us how we can improve this page.
Thank you for your feedback!
We value your opinion. Your feedback will help us improve our documentation.