Removed un-need list conversion in sub/super script unicode mapper
This commit is contained in:
parent
e5d8bacc5e
commit
72d8ff03a9
|
@ -222,17 +222,9 @@ public class FourCornerUnicodeDisplay {
|
||||||
@Override
|
@Override
|
||||||
public void strobeNCR1632(BigInteger denominator, BigInteger numerator) {
|
public void strobeNCR1632(BigInteger denominator, BigInteger numerator) {
|
||||||
List<Integer> math = new ArrayList<>();
|
List<Integer> math = new ArrayList<>();
|
||||||
FourCornerUnicodeMapper.DICTIONARY.toScriptSuper(numerator).forEach(v -> {
|
FourCornerUnicodeMapper.DICTIONARY.toScriptSuper(numerator).forEach(v -> math.add(v.cakePointDotIndex()));
|
||||||
for (int chr : v.cakePointSequence()) {
|
|
||||||
math.add(chr);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
math.add(FCDotCDC1604DashP6.NY02_BAR_V_RIGHT.ordinal());
|
math.add(FCDotCDC1604DashP6.NY02_BAR_V_RIGHT.ordinal());
|
||||||
FourCornerUnicodeMapper.DICTIONARY.toScriptSub(denominator).forEach(v -> {
|
FourCornerUnicodeMapper.DICTIONARY.toScriptSub(denominator).forEach(v -> math.add(v.cakePointDotIndex()));
|
||||||
for (int chr : v.cakePointSequence()) {
|
|
||||||
math.add(chr);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
renderFromInt18(math, output);
|
renderFromInt18(math, output);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -163,24 +163,24 @@ public enum FourCornerUnicodeMapper {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<FourCornerX18CakePointSequence> toScriptSuper(int value) {
|
public List<FourCornerX18CakePointDotIndex> toScriptSuper(int value) {
|
||||||
return toScript(Integer.toString(value), 0);
|
return toScript(Integer.toString(value), 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<FourCornerX18CakePointSequence> toScriptSub(int value) {
|
public List<FourCornerX18CakePointDotIndex> toScriptSub(int value) {
|
||||||
return toScript(Integer.toString(value), 10);
|
return toScript(Integer.toString(value), 10);
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<FourCornerX18CakePointSequence> toScriptSuper(BigInteger value) {
|
public List<FourCornerX18CakePointDotIndex> toScriptSuper(BigInteger value) {
|
||||||
return toScript(value.toString(10), 0);
|
return toScript(value.toString(10), 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<FourCornerX18CakePointSequence> toScriptSub(BigInteger value) {
|
public List<FourCornerX18CakePointDotIndex> toScriptSub(BigInteger value) {
|
||||||
return toScript(value.toString(10), 10);
|
return toScript(value.toString(10), 10);
|
||||||
}
|
}
|
||||||
|
|
||||||
private List<FourCornerX18CakePointSequence> toScript(String value, int off) {
|
private List<FourCornerX18CakePointDotIndex> toScript(String value, int off) {
|
||||||
List<FourCornerX18CakePointSequence> result = new ArrayList<>();
|
List<FourCornerX18CakePointDotIndex> result = new ArrayList<>();
|
||||||
PrimitiveIterator.OfInt i = value.codePoints().iterator();
|
PrimitiveIterator.OfInt i = value.codePoints().iterator();
|
||||||
while (i.hasNext()) {
|
while (i.hasNext()) {
|
||||||
int chr = i.nextInt();
|
int chr = i.nextInt();
|
||||||
|
|
Loading…
Reference in a new issue