Class BundledUnicodeData.Lazy<T>
java.lang.Object
opennlp.tools.util.normalizer.BundledUnicodeData.Lazy<T>
- Type Parameters:
T- The type of the data.
- Enclosing class:
BundledUnicodeData
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
Lazy
Creates a holder that has not loaded yet.- Parameters:
loader- Loads the data. Must not benulland must not returnnull.- Throws:
IllegalArgumentException- Thrown ifloaderisnull.
-
-
Method Details
-
get
Returns the data, loading it on the first successful call.- Returns:
- The loaded data.
- Throws:
IllegalStateException- Thrown if the loader returnsnull.RuntimeException- Thrown as is if the loader fails; the next call loads again.
-