Added little bit of documentation and made display embedded lazy

This commit is contained in:
Willem Cazander 2025-01-17 02:02:22 +01:00
parent 73d408f1ec
commit 940df2204c
2 changed files with 9 additions and 3 deletions

View file

@ -135,12 +135,11 @@ public class FourCornerUnicodeDisplay {
private final class StenoUnicodePrinter implements FourCornerZion7Candlelier, FourCornerZionStenoLexerSmoke.Adapter { private final class StenoUnicodePrinter implements FourCornerZion7Candlelier, FourCornerZionStenoLexerSmoke.Adapter {
private final StringBuilder output; private final StringBuilder output;
private final FourCornerZionStenoLexer thisDisplayEscaked; private FourCornerZionStenoLexer thisDisplayEscaked = null;
private boolean wasExternalWord = false; private boolean wasExternalWord = false;
private StenoUnicodePrinter(StringBuilder output) { private StenoUnicodePrinter(StringBuilder output) {
this.output = Objects.requireNonNull(output); this.output = Objects.requireNonNull(output);
this.thisDisplayEscaked = new FourCornerZionStenoLexer(this, true);
} }
private boolean printedEscape(FourCornerDotCake slice, int offset) { private boolean printedEscape(FourCornerDotCake slice, int offset) {
@ -246,6 +245,9 @@ public class FourCornerUnicodeDisplay {
@Override @Override
public void strobeRecursiveCake(List<Integer> cakePoints) { public void strobeRecursiveCake(List<Integer> cakePoints) {
if (thisDisplayEscaked == null) {
thisDisplayEscaked = new FourCornerZionStenoLexer(this, true);
}
thisDisplayEscaked.read(cakePoints); thisDisplayEscaked.read(cakePoints);
} }

View file

@ -36,15 +36,19 @@ public interface FourCornerZion7Candlelier {
/// Block of relative slice numbers. /// Block of relative slice numbers.
void strobeWords(FourCornerDotCake slice, List<Integer> offsets); void strobeWords(FourCornerDotCake slice, List<Integer> offsets);
/// Single word from slice.
void strobeWord(FourCornerDotCake slice, int offset); void strobeWord(FourCornerDotCake slice, int offset);
/// One based already /// 576 bit fraction for numbers.
void strobeNCR1632(BigInteger denominator, BigInteger numerator); void strobeNCR1632(BigInteger denominator, BigInteger numerator);
/// To support current code and resources which require unicode to access.
void strobeUnicode(List<Integer> codePoints); void strobeUnicode(List<Integer> codePoints);
/// Allows a 6 bit computer to use the nether,fractions or unicode.
void strobeRecursiveCake(List<Integer> cakePoints); void strobeRecursiveCake(List<Integer> cakePoints);
/// Dark octal data, with up to 576 bit mime-type data type header.
void strobeNether(List<Integer> key, List<Integer> octals); void strobeNether(List<Integer> key, List<Integer> octals);
interface Adapter extends FourCornerZion7Candlelier { interface Adapter extends FourCornerZion7Candlelier {