BreakDictionary.java
1.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
/*
* Decompiled with CFR 0_118.
*/
package com.adobe.agl.text;
import com.adobe.agl.util.CompactByteArray;
public class BreakDictionary {
private CompactByteArray columnMap;
private int numCols;
private short[] table;
private short[] rowIndex;
private int[] rowIndexFlags;
private short[] rowIndexFlagsIndex;
private byte[] rowIndexShifts;
public final short at(int row, char ch) {
byte col = this.columnMap.elementAt(ch);
return this.at(row, col);
}
public final short at(int row, int col) {
if (this.cellIsPopulated(row, col)) {
return this.internalAt(this.rowIndex[row], col + this.rowIndexShifts[row]);
}
return 0;
}
private final boolean cellIsPopulated(int row, int col) {
if (this.rowIndexFlagsIndex[row] < 0) {
return col == - this.rowIndexFlagsIndex[row];
}
int flags = this.rowIndexFlags[this.rowIndexFlagsIndex[row] + (col >> 5)];
return (flags & 1 << (col & 31)) != 0;
}
private final short internalAt(int row, int col) {
return this.table[row * this.numCols + col];
}
}