PasswordDictionary
All Implemented Interfaces: com.groupdocs.search.dictionaries.DictionaryBase, java.lang.Iterable
public interface PasswordDictionary extends DictionaryBase, Iterable<String>
Defines interface of a dictionary of document passwords.
Learn more
Methods
Method | Description |
---|---|
getCount() | Gets the number of elements contained in the dictionary. |
getPassword(String filePath) | Gets the password for the file. |
clear() | Removes all passwords from this PasswordDictionary object. |
contains(String filePath) | Determines whether the dictionary contains a password for the specified document. |
add(String filePath, String password) | Adds a password for a document to the dictionary. |
remove(String filePath) | Removes a password of the specified document from the dictionary. |
iterator() | 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.