public final class DictionaryLoader<E> extends Object
Constructor and Description |
---|
DictionaryLoader(java.util.function.Supplier<E> supplier,
java.util.function.BiConsumer<E,String> loader) |
Modifier and Type | Method and Description |
---|---|
E |
loadCachedFromFile(File file,
String dictionaryName)
returns word list loaded from file
|
E |
loadCachedFromResource(String path,
String dictionaryName)
returns word list loaded from resource
|
public DictionaryLoader(java.util.function.Supplier<E> supplier, java.util.function.BiConsumer<E,String> loader)
public E loadCachedFromResource(String path, String dictionaryName) throws RedPenException
path
- resource pathdictionaryName
- name of the resourceRedPenException
public E loadCachedFromFile(File file, String dictionaryName) throws RedPenException
file
- file to loaddictionaryName
- name of the fileRedPenException
Copyright © 2015. All rights reserved.