Dictionary content is loaded from binary resource when getData() is executed for the
first time. Consequently, it saves memory and CPU in case dictionary is not required.
One possible drawback is that multiple threads that need dictionary data may be blocked (only
once in each classworld). To avoid this, it is enough to call getData() proactively.
| Modifier and Type | Class and Description |
|---|---|
| private static class | |
| private static class | Dictionary.DataHolder0
"Initialization-on-demand holder idiom" implementation. |
| private static class | |
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv static final int | |
| pack-priv static final int | |
| pack-priv static final int | |
| pack-priv static final int[] | |
| pack-priv static final int[] |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv static byte[] |
| MAX_TRANSFORMED_WORD_LENGTH | back to summary |
|---|---|
| pack-priv static final int MAX_TRANSFORMED_WORD_LENGTH | |
| MAX_WORD_LENGTH | back to summary |
|---|---|
| pack-priv static final int MAX_WORD_LENGTH | |
| MIN_WORD_LENGTH | back to summary |
|---|---|
| pack-priv static final int MIN_WORD_LENGTH | |
| OFFSETS_BY_LENGTH | back to summary |
|---|---|
| pack-priv static final int[] OFFSETS_BY_LENGTH | |
| SIZE_BITS_BY_LENGTH | back to summary |
|---|---|
| pack-priv static final int[] SIZE_BITS_BY_LENGTH | |
| Dictionary | back to summary |
|---|---|
| pack-priv Dictionary() | |
| getData | back to summary |
|---|---|
| pack-priv static byte[] getData() | |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv static final byte[] |
| Access | Constructor and Description |
|---|---|
| private |
| DATA | back to summary |
|---|---|
| pack-priv static final byte[] DATA | |
| DataHolder | back to summary |
|---|---|
| private DataHolder() | |
This static class definition is not initialized until the JVM determines that it must be
executed (when the static method getData() is invoked).
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv static String |
| DataHolder0 | back to summary |
|---|---|
| private DataHolder0() | |
| getData | back to summary |
|---|---|
| pack-priv static String getData() | |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv static String |
| DataHolder1 | back to summary |
|---|---|
| private DataHolder1() | |
| getData | back to summary |
|---|---|
| pack-priv static String getData() | |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv static String |
| DataHolder2 | back to summary |
|---|---|
| private DataHolder2() | |
| getData | back to summary |
|---|---|
| pack-priv static String getData() | |