diff --git a/core/src/love/distributedrebirth/demo4d/screen/HebrewWalletRenderer.java b/core/src/love/distributedrebirth/demo4d/screen/HebrewWalletRenderer.java index 992e828a..d6329b0a 100644 --- a/core/src/love/distributedrebirth/demo4d/screen/HebrewWalletRenderer.java +++ b/core/src/love/distributedrebirth/demo4d/screen/HebrewWalletRenderer.java @@ -46,7 +46,7 @@ public class HebrewWalletRenderer extends ImGuiRendererMain { }; for (String data:walletData) { Gê̄ldGetậl geld = new Gê̄ldGetậl(data); - Gê̄ldGetậl geld2 = new Gê̄ldGetậl(geld.toTeger().toClone().toClone()); // unit test + Gê̄ldGetậl geld2 = geld.toClone(); // unit test ImGui.tableNextRow(); ImGui.tableNextColumn(); ImGui.text(data.length()==2||data.length()==3?"OUT":"IN"); diff --git a/numberxd/src/main/love/distributedrebirth/numberxd/AbstractBaseGetậlLevel0.java b/numberxd/src/main/love/distributedrebirth/numberxd/AbstractBaseGetậlLevel0.java new file mode 100644 index 00000000..5567999a --- /dev/null +++ b/numberxd/src/main/love/distributedrebirth/numberxd/AbstractBaseGetậlLevel0.java @@ -0,0 +1,20 @@ +package love.distributedrebirth.numberxd; + +import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ; +import love.distributedrebirth.numberxd.base2t.BaseNumber; + +@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天") +abstract public class AbstractBaseGetậlLevel0,V extends BaseNumber> implements BaseGetậlLevel0 { + + protected int valueIndex0; + + @Override + public void setValueIndex0(int valueIndex0) { + this.valueIndex0 = valueIndex0; + } + + @Override + public int getValueIndex0() { + return valueIndex0; + } +} diff --git a/numberxd/src/main/love/distributedrebirth/numberxd/AbstractBaseGetậlLevel1.java b/numberxd/src/main/love/distributedrebirth/numberxd/AbstractBaseGetậlLevel1.java new file mode 100644 index 00000000..65b05751 --- /dev/null +++ b/numberxd/src/main/love/distributedrebirth/numberxd/AbstractBaseGetậlLevel1.java @@ -0,0 +1,20 @@ +package love.distributedrebirth.numberxd; + +import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ; +import love.distributedrebirth.numberxd.base2t.BaseNumber; + +@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天") +abstract public class AbstractBaseGetậlLevel1,V extends BaseNumber> extends AbstractBaseGetậlLevel0 implements BaseGetậlLevel1 { + + protected int valueIndex1; + + @Override + public void setValueIndex1(int valueIndex1) { + this.valueIndex1 = valueIndex1; + } + + @Override + public int getValueIndex1() { + return valueIndex1; + } +} diff --git a/numberxd/src/main/love/distributedrebirth/numberxd/AbstractBaseGetậlLevel2.java b/numberxd/src/main/love/distributedrebirth/numberxd/AbstractBaseGetậlLevel2.java new file mode 100644 index 00000000..5312d81d --- /dev/null +++ b/numberxd/src/main/love/distributedrebirth/numberxd/AbstractBaseGetậlLevel2.java @@ -0,0 +1,20 @@ +package love.distributedrebirth.numberxd; + +import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ; +import love.distributedrebirth.numberxd.base2t.BaseNumber; + +@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天") +abstract public class AbstractBaseGetậlLevel2,V extends BaseNumber> extends AbstractBaseGetậlLevel1 implements BaseGetậlLevel2 { + + protected int valueIndex2; + + @Override + public void setValueIndex2(int valueIndex1) { + this.valueIndex1 = valueIndex1; + } + + @Override + public int getValueIndex2() { + return valueIndex1; + } +} diff --git a/numberxd/src/main/love/distributedrebirth/numberxd/AbstractGroßGetậlŌṁ1ⁿᴰ.java b/numberxd/src/main/love/distributedrebirth/numberxd/AbstractGroßGetậlŌṁ1ⁿᴰ.java new file mode 100644 index 00000000..36682787 --- /dev/null +++ b/numberxd/src/main/love/distributedrebirth/numberxd/AbstractGroßGetậlŌṁ1ⁿᴰ.java @@ -0,0 +1,53 @@ +package love.distributedrebirth.numberxd; + +import love.distributedrebirth.numberxd.base2t.BaseIteratorOctal; +import love.distributedrebirth.numberxd.base2t.part.T16PartHex; +import love.distributedrebirth.numberxd.base2t.type.V009Tyte; +import love.distributedrebirth.numberxd.base2t.type.V144Tocta; +import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ; + +@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天") +abstract public class AbstractGroßGetậlŌṁ1ⁿᴰ> extends AbstractBaseGetậlLevel1 { + + private V144Tocta[] values; + private int valuesLength; + private byte fractalLevel; + + public AbstractGroßGetậlŌṁ1ⁿᴰ(byte fractalLevel) { + this.fractalLevel = fractalLevel; + this.valuesLength = resolveFractalLevel(fractalLevel); + this.values = new V144Tocta[valuesLength]; + for (int i=0;i> extends AbstractBaseGetậlLevel2 { + + private V144Tocta[][] values; + private int valuesLength; + private byte fractalLevel; + + public AbstractGroßGetậlŌṁ6ˢᴰ(byte fractalLevel) { + this.fractalLevel = fractalLevel; + this.valuesLength = resolveFractalLevel(fractalLevel); + this.values = new V144Tocta[T12PartUncial.LENGTH()][valuesLength]; + for (int x=0;x> extends BaseNumberTyte { +import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ; +import love.distributedrebirth.numberxd.base2t.BaseNumber; +@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天") +public interface BaseGetậl,V extends BaseNumber> { + V getValue(); + + T toClone(); } diff --git a/numberxd/src/main/love/distributedrebirth/numberxd/BaseGetậlLevel0.java b/numberxd/src/main/love/distributedrebirth/numberxd/BaseGetậlLevel0.java new file mode 100644 index 00000000..5f35b12c --- /dev/null +++ b/numberxd/src/main/love/distributedrebirth/numberxd/BaseGetậlLevel0.java @@ -0,0 +1,14 @@ +package love.distributedrebirth.numberxd; + +import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ; +import love.distributedrebirth.numberxd.base2t.BaseNumber; + +@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天") +public interface BaseGetậlLevel0,V extends BaseNumber> extends BaseGetậl { + + void setValueIndex0(int valueIndex0); + + int getValueIndex0(); + + int getValueIndex0Length(); +} diff --git a/numberxd/src/main/love/distributedrebirth/numberxd/BaseGetậlLevel1.java b/numberxd/src/main/love/distributedrebirth/numberxd/BaseGetậlLevel1.java new file mode 100644 index 00000000..b0c2e460 --- /dev/null +++ b/numberxd/src/main/love/distributedrebirth/numberxd/BaseGetậlLevel1.java @@ -0,0 +1,14 @@ +package love.distributedrebirth.numberxd; + +import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ; +import love.distributedrebirth.numberxd.base2t.BaseNumber; + +@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天") +public interface BaseGetậlLevel1,V extends BaseNumber> extends BaseGetậlLevel0 { + + void setValueIndex1(int valueIndex1); + + int getValueIndex1(); + + int getValueIndex1Length(); +} diff --git a/numberxd/src/main/love/distributedrebirth/numberxd/BaseGetậlLevel2.java b/numberxd/src/main/love/distributedrebirth/numberxd/BaseGetậlLevel2.java new file mode 100644 index 00000000..a19f05a5 --- /dev/null +++ b/numberxd/src/main/love/distributedrebirth/numberxd/BaseGetậlLevel2.java @@ -0,0 +1,14 @@ +package love.distributedrebirth.numberxd; + +import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ; +import love.distributedrebirth.numberxd.base2t.BaseNumber; + +@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天") +public interface BaseGetậlLevel2,V extends BaseNumber> extends BaseGetậlLevel1 { + + void setValueIndex2(int valueIndex1); + + int getValueIndex2(); + + int getValueIndex2Length(); +} diff --git a/numberxd/src/main/love/distributedrebirth/numberxd/BaseGetậlLevel3.java b/numberxd/src/main/love/distributedrebirth/numberxd/BaseGetậlLevel3.java new file mode 100644 index 00000000..bf4ff190 --- /dev/null +++ b/numberxd/src/main/love/distributedrebirth/numberxd/BaseGetậlLevel3.java @@ -0,0 +1,14 @@ +package love.distributedrebirth.numberxd; + +import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ; +import love.distributedrebirth.numberxd.base2t.BaseNumber; + +@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天") +public interface BaseGetậlLevel3,V extends BaseNumber> extends BaseGetậlLevel2 { + + void setValueIndex3(int valueIndex1); + + int getValueIndex3(); + + int getValueIndex3Length(); +} diff --git a/numberxd/src/main/love/distributedrebirth/numberxd/GroßGetậl1ⁿᴰ.java b/numberxd/src/main/love/distributedrebirth/numberxd/GroßGetậl1ⁿᴰ.java index 24d06751..3e1e7cd0 100644 --- a/numberxd/src/main/love/distributedrebirth/numberxd/GroßGetậl1ⁿᴰ.java +++ b/numberxd/src/main/love/distributedrebirth/numberxd/GroßGetậl1ⁿᴰ.java @@ -1,101 +1,53 @@ package love.distributedrebirth.numberxd; -import java.util.ArrayList; -import java.util.List; - -import love.distributedrebirth.numberxd.base2t.BaseAppenderOctal; +import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ; import love.distributedrebirth.numberxd.base2t.BaseIteratorOctal; -import love.distributedrebirth.numberxd.base2t.BaseAppenderTyte; import love.distributedrebirth.numberxd.base2t.BaseIteratorTyte; +import love.distributedrebirth.numberxd.base2t.part.T16PartHex; import love.distributedrebirth.numberxd.base2t.type.V009Tyte; import love.distributedrebirth.numberxd.base2t.type.V144Tocta; /** * Holds an 144 bit fraction. - * - * @author willemtsade ©Δ∞ 仙上主天 */ -public class GroßGetậl1ⁿᴰ implements BaseGetậl { +@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天") +public class GroßGetậl1ⁿᴰ extends AbstractBaseGetậlLevel0 { - public static int NUMERATOR_SIZE = 7; - public static int DENOMINATOR_SIZE = 9; - public static int BIT_COUNT = V144Tocta.BIT_COUNT; - private final V009Tyte[] numerator = new V009Tyte[NUMERATOR_SIZE]; - private final V009Tyte[] denominator = new V009Tyte[DENOMINATOR_SIZE]; + //public static int NUMERATOR_SIZE = 7; + //public static int DENOMINATOR_SIZE = 9; + //public static int BIT_COUNT = V144Tocta.BIT_COUNT; + //private final V009Tyte[] numerator = new V009Tyte[NUMERATOR_SIZE]; + //private final V009Tyte[] denominator = new V009Tyte[DENOMINATOR_SIZE]; + private final V144Tocta value; public GroßGetậl1ⁿᴰ() { - for (int i=0;i tytes = new ArrayList<>(); - tocta.fillTytesByReference(new BaseAppenderTyte(tytes)); - for (int i=0;i { +@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天") +public class GroßGetậl6ˢᴰ extends AbstractBaseGetậlLevel1 { - public static int BIT_COUNT = GroßGetậl1ⁿᴰ.BIT_COUNT * T12PartUncial.LENGTH(); - private GroßGetậl1ⁿᴰ[] values = new GroßGetậl1ⁿᴰ[T12PartUncial.LENGTH()]; + private final V144Tocta[] values = new V144Tocta[T12PartUncial.LENGTH()]; public GroßGetậl6ˢᴰ() { for (int i=0;i getValue(v).fillOctalsByClone(appender)); - } - - @Override - public void fillTytesByReference(BaseAppenderTyte appender) { - T12PartUncial.PART_1.BãßVoorElk(v -> getValue(v).fillTytesByReference(appender)); + BaseIteratorOctalStack cloneStack = new BaseIteratorOctalStack(); + for (int i=0;i & BaseNumber> implements BaseNumber { - - private GroßGetậl1ⁿᴰ[] values; - private int valuesLength; - private byte fractalLevel; - - public GroßGetậlŌṁ1ⁿᴰ(byte fractalLevel) { - this.fractalLevel = fractalLevel; - this.valuesLength = resolveFractalLevel(fractalLevel); - this.values = new GroßGetậl1ⁿᴰ[valuesLength]; - } - - abstract protected int resolveFractalLevel(byte level); - - public final byte getFractalLevel() { - return fractalLevel; - } - - public final int getValuesLength() { - return valuesLength; - } - - private final int validatePartRequest(int part) { - if (part < 0) { - throw new IllegalArgumentException("Requested part is negative"); - } - if (part > valuesLength) { - throw new IllegalArgumentException("Requested part exceeds fractal storage"); - } - return part; - } - - public final GroßGetậl1ⁿᴰ getValue(int part) { - return values[validatePartRequest(part)]; - } - - public final void setValue(int part, GroßGetậl1ⁿᴰ value) { - values[validatePartRequest(part)] = value; - } - - abstract protected V toCloneFractal(byte level); - - @Override - public final V toClone() { - V result = toCloneFractal(getFractalLevel()); - BaseIteratorOctal clonedOctals = iteratorOctalsByClone(); - for (int i=0;i & BaseNumber> implements BaseNumber { - - private GroßGetậl6ˢᴰ[] values; - private int valuesLength; - private byte fractalLevel; - - public GroßGetậlŌṁ6ˢᴰ(byte fractalLevel) { - this.fractalLevel = fractalLevel; - this.valuesLength = resolveFractalLevel(fractalLevel); - this.values = new GroßGetậl6ˢᴰ[valuesLength]; - } - - abstract protected int resolveFractalLevel(byte level); - - public final byte getFractalLevel() { - return fractalLevel; - } - - public final int getValuesLength() { - return valuesLength; - } - - private final int validatePartRequest(int part) { - if (part < 0) { - throw new IllegalArgumentException("Requested part is negative"); - } - if (part > valuesLength) { - throw new IllegalArgumentException("Requested part exceeds fractal storage"); - } - return part; - } - - public final GroßGetậl6ˢᴰ getValue(int part) { - return values[validatePartRequest(part)]; - } - - public final void setValue(int part, GroßGetậl6ˢᴰ value) { - values[validatePartRequest(part)] = value; - } - - abstract protected V toCloneFractal(byte level); - - @Override - public final V toClone() { - V result = toCloneFractal(getFractalLevel()); - BaseIteratorOctal clonedOctals = iteratorOctalsByClone(); - for (int i=0;i { +import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ; +import love.distributedrebirth.numberxd.base2t.BaseIteratorOctal; +import love.distributedrebirth.numberxd.base2t.BaseIteratorOctalStack; + +@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天") +public class GroßGetậlŌṁDiamond1ⁿᴰ extends AbstractGroßGetậlŌṁ1ⁿᴰ { // 0th = 1 * V144Tocta (1) // 1th = 1+3 * V144Tocta (4) @@ -16,13 +17,25 @@ public class GroßGetậlŌṁDiamond1ⁿᴰ extends GroßGetậlŌṁ1ⁿᴰ { +import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ; +import love.distributedrebirth.numberxd.base2t.BaseIteratorOctal; +import love.distributedrebirth.numberxd.base2t.BaseIteratorOctalStack; + +@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天") +public class GroßGetậlŌṁDiamond6ˢᴰ extends AbstractGroßGetậlŌṁ6ˢᴰ { // 0th = 1 * V144Tocta (1) // 1th = 1+3 * V144Tocta (4) @@ -16,13 +17,28 @@ public class GroßGetậlŌṁDiamond6ˢᴰ extends GroßGetậlŌṁ6ˢᴰ { +import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ; +import love.distributedrebirth.numberxd.base2t.BaseIteratorOctal; +import love.distributedrebirth.numberxd.base2t.BaseIteratorOctalStack; + +@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天") +public class GroßGetậlŌṁHyperStàr1ⁿᴰ extends AbstractGroßGetậlŌṁ1ⁿᴰ { // 0th = V144Tocta // 1th = 5 * V144Tocta @@ -15,13 +16,25 @@ public class GroßGetậlŌṁHyperStàr1ⁿᴰ extends GroßGetậlŌṁ1ⁿᴰ super(level); } + public GroßGetậlŌṁHyperStàr1ⁿᴰ(byte level, BaseIteratorOctal values) { + super(level, values); + } + protected int resolveFractalLevel(byte level) { // TODO return level; } - + @Override - protected GroßGetậlŌṁHyperStàr1ⁿᴰ toCloneFractal(byte level) { - return new GroßGetậlŌṁHyperStàr1ⁿᴰ(level); + public GroßGetậlŌṁHyperStàr1ⁿᴰ toClone() { + BaseIteratorOctalStack cloneStack = new BaseIteratorOctalStack(); + for (int x=0;x { +import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ; +import love.distributedrebirth.numberxd.base2t.BaseIteratorOctal; +import love.distributedrebirth.numberxd.base2t.BaseIteratorOctalStack; + +@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天") +public class GroßGetậlŌṁHyperStàr6ˢᴰ extends AbstractGroßGetậlŌṁ6ˢᴰ { // 0th = V144Tocta // 1th = 5 * V144Tocta @@ -15,13 +16,28 @@ public class GroßGetậlŌṁHyperStàr6ˢᴰ extends GroßGetậlŌṁ6ˢᴰ { - private final Gê̄ldGetậlÅtHebrew nummerAlphabet; - private final Gê̄ldGetậlÅtHebrew nummerDeelA; - private final Gê̄ldGetậlÅtHebrew nummerDeelB; - private final Gê̄ldGetậlÅtHebrew nummerDeelC; + private final V036Teger value; private final double totalDecimalValue; private static final Character LEFT_TO_RIGHT_MARK = 0x200E; private static final Character RIGHT_TO_LEFT_MARK = 0x200F; - public Gê̄ldGetậl(V036Teger teger) { - this( - new Gê̄ldGetậlÅtHebrew(teger.getTytePart(T04PartQuad.PART_1)), - new Gê̄ldGetậlÅtHebrew(teger.getTytePart(T04PartQuad.PART_2)), - new Gê̄ldGetậlÅtHebrew(teger.getTytePart(T04PartQuad.PART_3)), - new Gê̄ldGetậlÅtHebrew(teger.getTytePart(T04PartQuad.PART_4)) - ); - } - - public Gê̄ldGetậl(Gê̄ldGetậlÅtHebrew nummerAlphabet, Gê̄ldGetậlÅtHebrew nummerDeelA, Gê̄ldGetậlÅtHebrew nummerDeelB, Gê̄ldGetậlÅtHebrew nummerDeelC) { - this.nummerAlphabet = nummerAlphabet; - this.nummerDeelA = nummerDeelA; - this.nummerDeelB = nummerDeelB; - this.nummerDeelC = nummerDeelC; + public Gê̄ldGetậl(V036Teger value) { + this.value = value; this.totalDecimalValue = calculateDecimalValue(); } @@ -101,14 +85,19 @@ public class Gê̄ldGetậl { } else { deelC = new Gê̄ldGetậlÅtHebrew(); } - this.nummerAlphabet = full; - this.nummerDeelA = deelA; - this.nummerDeelB = deelB; - this.nummerDeelC = deelC; + value = new V036Teger(); + value.setTytePart(T04PartQuad.PART_1, full.toTyte()); + value.setTytePart(T04PartQuad.PART_2, deelA.toTyte()); + value.setTytePart(T04PartQuad.PART_3, deelB.toTyte()); + value.setTytePart(T04PartQuad.PART_4, deelC.toTyte()); this.totalDecimalValue = calculateDecimalValue(); } private double calculateDecimalValue() { + Gê̄ldGetậlÅtHebrew nummerAlphabet = new Gê̄ldGetậlÅtHebrew(value.getTytePart(T04PartQuad.PART_1)); + Gê̄ldGetậlÅtHebrew nummerDeelA = new Gê̄ldGetậlÅtHebrew(value.getTytePart(T04PartQuad.PART_2)); + Gê̄ldGetậlÅtHebrew nummerDeelB = new Gê̄ldGetậlÅtHebrew(value.getTytePart(T04PartQuad.PART_3)); + Gê̄ldGetậlÅtHebrew nummerDeelC = new Gê̄ldGetậlÅtHebrew(value.getTytePart(T04PartQuad.PART_4)); boolean hasFourDigits = !Gê̄ldGetậlÅtHebrewLetter.NONE.equals(nummerDeelA.getLetter()) && !Gê̄ldGetậlÅtHebrewLetter.NONE.equals(nummerDeelB.getLetter()) && @@ -126,40 +115,19 @@ public class Gê̄ldGetậl { return totalDecimalValue; } - public Gê̄ldGetậlÅtHebrew getNummerAlphabet() { - return nummerAlphabet; - } - - public Gê̄ldGetậlÅtHebrew getNummerDeelA() { - return nummerDeelA; - } - - public Gê̄ldGetậlÅtHebrew getNummerDeelB() { - return nummerDeelB; - } - - public Gê̄ldGetậlÅtHebrew getNummerDeelC() { - return nummerDeelC; - } - public double getTotalDecimalValue() { return totalDecimalValue; } - public V036Teger toTeger() { - V036Teger result = new V036Teger(); - result.setTytePart(T04PartQuad.PART_1, nummerAlphabet.toTyte()); - result.setTytePart(T04PartQuad.PART_2, nummerDeelA.toTyte()); - result.setTytePart(T04PartQuad.PART_3, nummerDeelB.toTyte()); - result.setTytePart(T04PartQuad.PART_4, nummerDeelC.toTyte()); - return result; - } - public String toHebrewString() { return toHebrewString(false); } public String toHebrewString(boolean reverse) { + Gê̄ldGetậlÅtHebrew nummerAlphabet = new Gê̄ldGetậlÅtHebrew(value.getTytePart(T04PartQuad.PART_1)); + Gê̄ldGetậlÅtHebrew nummerDeelA = new Gê̄ldGetậlÅtHebrew(value.getTytePart(T04PartQuad.PART_2)); + Gê̄ldGetậlÅtHebrew nummerDeelB = new Gê̄ldGetậlÅtHebrew(value.getTytePart(T04PartQuad.PART_3)); + Gê̄ldGetậlÅtHebrew nummerDeelC = new Gê̄ldGetậlÅtHebrew(value.getTytePart(T04PartQuad.PART_4)); StringBuilder buf = new StringBuilder(); buf.append(RIGHT_TO_LEFT_MARK); buf.append(nummerAlphabet.getLetter().getCharacter()); @@ -189,4 +157,19 @@ public class Gê̄ldGetậl { } return buf.toString(); } + + @Override + public int getValueIndex0Length() { + return T04PartQuad.LENGTH(); + } + + @Override + public V009Tyte getValue() { + return value.getTytePart(T04PartQuad.values()[valueIndex0]); + } + + @Override + public Gê̄ldGetậl toClone() { + return new Gê̄ldGetậl(value.toClone()); + } } diff --git a/numberxd/src/main/love/distributedrebirth/numberxd/Gê̄ldGetậlÅtHebrew.java b/numberxd/src/main/love/distributedrebirth/numberxd/Gê̄ldGetậlÅtHebrew.java index 2a56d068..7438a0ca 100644 --- a/numberxd/src/main/love/distributedrebirth/numberxd/Gê̄ldGetậlÅtHebrew.java +++ b/numberxd/src/main/love/distributedrebirth/numberxd/Gê̄ldGetậlÅtHebrew.java @@ -1,14 +1,11 @@ package love.distributedrebirth.numberxd; +import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ; import love.distributedrebirth.numberxd.base2t.part.T03PartTrit; import love.distributedrebirth.numberxd.base2t.part.T08PartOctal; import love.distributedrebirth.numberxd.base2t.type.V009Tyte; -/** - * - * - * @author willemtsade ©Δ∞ 仙上主天 - */ +@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天") public class Gê̄ldGetậlÅtHebrew { private static final double NUMERATOR_ONE = 1d; diff --git a/numberxd/src/main/love/distributedrebirth/numberxd/Gê̄ldGetậlÅtHebrewLetter.java b/numberxd/src/main/love/distributedrebirth/numberxd/Gê̄ldGetậlÅtHebrewLetter.java index 0ee15816..bde0eb61 100644 --- a/numberxd/src/main/love/distributedrebirth/numberxd/Gê̄ldGetậlÅtHebrewLetter.java +++ b/numberxd/src/main/love/distributedrebirth/numberxd/Gê̄ldGetậlÅtHebrewLetter.java @@ -5,11 +5,9 @@ import java.util.Collections; import java.util.Map; import java.util.stream.Collectors; -/** - * - * - * @author willemtsade ©Δ∞ 仙上主天 - */ +import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ; + +@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天") public enum Gê̄ldGetậlÅtHebrewLetter { // Unicode is horror in any language else than ascii; // VS Alphabet order diff --git a/numberxd/src/main/love/distributedrebirth/numberxd/Gê̄ldGetậlÅtHebrewVowel.java b/numberxd/src/main/love/distributedrebirth/numberxd/Gê̄ldGetậlÅtHebrewVowel.java index b005b587..e7d03360 100644 --- a/numberxd/src/main/love/distributedrebirth/numberxd/Gê̄ldGetậlÅtHebrewVowel.java +++ b/numberxd/src/main/love/distributedrebirth/numberxd/Gê̄ldGetậlÅtHebrewVowel.java @@ -5,11 +5,9 @@ import java.util.Collections; import java.util.Map; import java.util.stream.Collectors; -/** - * - * - * @author willemtsade ©Δ∞ 仙上主天 - */ +import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ; + +@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天") public enum Gê̄ldGetậlÅtHebrewVowel { NONE (0, (char) 0x0000), VOWEL_1 (1, (char) 0x05B4), diff --git a/numberxd/src/main/love/distributedrebirth/numberxd/KlompGetậl4ˢᴰ.java b/numberxd/src/main/love/distributedrebirth/numberxd/KlompGetậl4ˢᴰ.java index 08ae1229..cca06c0e 100644 --- a/numberxd/src/main/love/distributedrebirth/numberxd/KlompGetậl4ˢᴰ.java +++ b/numberxd/src/main/love/distributedrebirth/numberxd/KlompGetậl4ˢᴰ.java @@ -1,24 +1,14 @@ package love.distributedrebirth.numberxd; -import love.distributedrebirth.numberxd.base2t.BaseNumberTyte; -import love.distributedrebirth.numberxd.base2t.part.T08PartOctal; -import love.distributedrebirth.numberxd.base2t.typexl.V0x000654ˣᴸ; import love.distributedrebirth.numberxd.base2t.typexl.V0x000CA8ˣᴸ; -import love.distributedrebirth.numberxd.base2t.BaseAppenderOctal; +import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ; import love.distributedrebirth.numberxd.base2t.BaseIteratorOctal; -import love.distributedrebirth.numberxd.base2t.BaseAppenderTyte; +import love.distributedrebirth.numberxd.base2t.BaseIteratorOctalStack; +import love.distributedrebirth.numberxd.base2t.part.T08PartOctal; -/** - * Holds an 25920 bit value. (3240 bytes) - * - * 4 * VCA8Tath red - * 4 * VCA8Tath blue - * - * @author willemtsade ©Δ∞ 仙上主天 - */ -public class KlompGetậl4ˢᴰ implements BaseNumberTyte { +@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天") +public class KlompGetậl4ˢᴰ extends AbstractBaseGetậlLevel0 { - public static int BIT_COUNT = V0x000654ˣᴸ.BIT_COUNT * T08PartOctal.LENGTH(); private final V0x000CA8ˣᴸ[] values = new V0x000CA8ˣᴸ[T08PartOctal.LENGTH()]; public KlompGetậl4ˢᴰ() { @@ -33,31 +23,22 @@ public class KlompGetậl4ˢᴰ implements BaseNumberTyte { } } - public V0x000CA8ˣᴸ getValue(T08PartOctal part) { - return values[part.ordinal()]; - } - - public void setValue(T08PartOctal part, V0x000CA8ˣᴸ value) { - values[part.ordinal()] = value; + @Override + public V0x000CA8ˣᴸ getValue() { + return values[valueIndex0]; } @Override - public int getBitCount() { - return BIT_COUNT; + public int getValueIndex0Length() { + return T08PartOctal.LENGTH(); } @Override public KlompGetậl4ˢᴰ toClone() { - return new KlompGetậl4ˢᴰ(iteratorOctalsByClone()); - } - - @Override - public void fillOctalsByClone(BaseAppenderOctal appender) { - T08PartOctal.PART_1.BãßVoorElk(v -> getValue(v).fillOctalsByClone(appender)); - } - - @Override - public void fillTytesByReference(BaseAppenderTyte appender) { - T08PartOctal.PART_1.BãßVoorElk(v -> getValue(v).fillTytesByReference(appender)); + BaseIteratorOctalStack cloneStack = new BaseIteratorOctalStack(); + for (int i=0;i { +@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天") +public class KlompÅtŌṁKāassGetậl4ˢᴰ extends AbstractBaseGetậlLevel1 { - private KlompGetậl4ˢᴰ[] kaas; + private final V0x000CA8ˣᴸ[][] kaas; private final int kaasCuts; public KlompÅtŌṁKāassGetậl4ˢᴰ(int kaasCuts) { + if (kaasCuts < 2) { + throw new IllegalArgumentException("Can't slice cheese into less than one peace."); + } this.kaasCuts = kaasCuts; - this.kaas = new KlompGetậl4ˢᴰ[kaasCuts]; + this.kaas = new V0x000CA8ˣᴸ[T08PartOctal.LENGTH()][kaasCuts]; + for (int x=0;x kaasCuts) { - throw new IllegalArgumentException("Requested part exceeds kaasCuts storage"); - } - return part; - } - - public final KlompGetậl4ˢᴰ getValue(int part) { - return kaas[validatePartRequest(part)]; - } - - public final void setValue(int part, KlompGetậl4ˢᴰ value) { - kaas[validatePartRequest(part)] = value; + @Override + public V0x000CA8ˣᴸ getValue() { + return kaas[valueIndex0][valueIndex1]; } @Override - public final KlompÅtŌṁKāassGetậl4ˢᴰ toClone() { - KlompÅtŌṁKāassGetậl4ˢᴰ result = new KlompÅtŌṁKāassGetậl4ˢᴰ(getKaasCuts()); - BaseIteratorOctal clonedOctals = iteratorOctalsByClone(); - for (int i=0;i { + + private final V0x049D40ˣᴸ[] values = new V0x049D40ˣᴸ[T04PartQuad.LENGTH()]; + + public WaveGetậl1ᑫᴰ() { + for (int i=0;i { + + private final V0x049D40ˣᴸ value; + + public WaveGetậl1ⁿᴰ() { + value = new V0x049D40ˣᴸ(); + } + + public WaveGetậl1ⁿᴰ(BaseIteratorOctal values) { + value = new V0x049D40ˣᴸ(values); + } + + @Override + public V0x049D40ˣᴸ getValue() { + return value; + } + + @Override + public WaveGetậl1ⁿᴰ toClone() { + return new WaveGetậl1ⁿᴰ(getValue().iteratorOctalsByClone()); + } +} diff --git a/numberxd/src/main/love/distributedrebirth/numberxd/base2t/Base2Terminator.java b/numberxd/src/main/love/distributedrebirth/numberxd/base2t/Base2Terminator.java index d357e70d..e990f7a1 100644 --- a/numberxd/src/main/love/distributedrebirth/numberxd/base2t/Base2Terminator.java +++ b/numberxd/src/main/love/distributedrebirth/numberxd/base2t/Base2Terminator.java @@ -37,7 +37,7 @@ public enum Base2Terminator implements BãßBȍőnEnumInstanceʸᴰ octals = Bãß2ReadOctals(v0, v1, v2); - output.add(new V072Tong(new BaseIteratorOctal(octals.iterator()))); + output.add(new V072Tong(new BaseIteratorOctalAdapter(octals.iterator()))); totalBytes += BLOCK_TONG_SIZE; } return totalBytes; @@ -56,7 +56,7 @@ public enum Base2Terminator implements BãßBȍőnEnumInstanceʸᴰ octals = Bãß2ReadOctals(v0, v1, v2, v3, v4, v5); - output.add(new V144Tocta(new BaseIteratorOctal(octals.iterator()))); + output.add(new V144Tocta(new BaseIteratorOctalAdapter(octals.iterator()))); totalBytes += BLOCK_TOCTA_SIZE; } return totalBytes; diff --git a/numberxd/src/main/love/distributedrebirth/numberxd/base2t/BaseIteratorOctal.java b/numberxd/src/main/love/distributedrebirth/numberxd/base2t/BaseIteratorOctal.java index e6744d50..aa6061d6 100644 --- a/numberxd/src/main/love/distributedrebirth/numberxd/base2t/BaseIteratorOctal.java +++ b/numberxd/src/main/love/distributedrebirth/numberxd/base2t/BaseIteratorOctal.java @@ -9,21 +9,7 @@ import love.distributedrebirth.numberxd.base2t.part.T08PartOctal; * Iterator model for Octals. */ @BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天") -public final class BaseIteratorOctal implements Iterator { - - private final Iterator iterator; +public interface BaseIteratorOctal extends Iterator { - public BaseIteratorOctal(Iterator iterator) { - this.iterator = iterator; - } - - @Override - public boolean hasNext() { - return iterator.hasNext(); - } - - @Override - public T08PartOctal next() { - return iterator.next(); - } } + diff --git a/numberxd/src/main/love/distributedrebirth/numberxd/base2t/BaseIteratorOctalAdapter.java b/numberxd/src/main/love/distributedrebirth/numberxd/base2t/BaseIteratorOctalAdapter.java new file mode 100644 index 00000000..bd6e4bd7 --- /dev/null +++ b/numberxd/src/main/love/distributedrebirth/numberxd/base2t/BaseIteratorOctalAdapter.java @@ -0,0 +1,29 @@ +package love.distributedrebirth.numberxd.base2t; + +import java.util.Iterator; + +import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ; +import love.distributedrebirth.numberxd.base2t.part.T08PartOctal; + +/** + * Iterator model for Octals. + */ +@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天") +public final class BaseIteratorOctalAdapter implements BaseIteratorOctal { + + private final Iterator iterator; + + public BaseIteratorOctalAdapter(Iterator iterator) { + this.iterator = iterator; + } + + @Override + public boolean hasNext() { + return iterator.hasNext(); + } + + @Override + public T08PartOctal next() { + return iterator.next(); + } +} diff --git a/numberxd/src/main/love/distributedrebirth/numberxd/base2t/BaseIteratorOctalStack.java b/numberxd/src/main/love/distributedrebirth/numberxd/base2t/BaseIteratorOctalStack.java new file mode 100644 index 00000000..d8205724 --- /dev/null +++ b/numberxd/src/main/love/distributedrebirth/numberxd/base2t/BaseIteratorOctalStack.java @@ -0,0 +1,45 @@ +package love.distributedrebirth.numberxd.base2t; + +import java.util.Stack; + +import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ; +import love.distributedrebirth.numberxd.base2t.part.T08PartOctal; + +/** + * Stack model for octal iterators. + */ +@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天") +public final class BaseIteratorOctalStack implements BaseIteratorOctal { + + private final Stack stack = new Stack<>(); + + public BaseIteratorOctalStack() { + } + + public void addIterator(BaseIteratorOctal iterator) { + stack.push(iterator); + } + + @Override + public boolean hasNext() { + if (stack.isEmpty()) { + return false; + } + if (stack.peek().hasNext()) { + return true; + } + stack.pop(); + if (stack.isEmpty()) { + return false; + } + return stack.peek().hasNext(); + } + + @Override + public T08PartOctal next() { + if (stack.isEmpty()) { + throw new IllegalStateException("Stack is empty."); + } + return stack.peek().next(); + } +} diff --git a/numberxd/src/main/love/distributedrebirth/numberxd/base2t/BaseNumber.java b/numberxd/src/main/love/distributedrebirth/numberxd/base2t/BaseNumber.java index f3647fdf..f15c2b73 100644 --- a/numberxd/src/main/love/distributedrebirth/numberxd/base2t/BaseNumber.java +++ b/numberxd/src/main/love/distributedrebirth/numberxd/base2t/BaseNumber.java @@ -27,6 +27,6 @@ public interface BaseNumber> { default BaseIteratorOctal iteratorOctalsByClone() { List octals = new ArrayList<>(); fillOctalsByClone(new BaseAppenderOctal(octals)); - return new BaseIteratorOctal(octals.iterator()); + return new BaseIteratorOctalAdapter(octals.iterator()); } } diff --git a/numberxd/src/main/love/distributedrebirth/numberxd/base2t/typexl/V0x006540ˣᴸ.java b/numberxd/src/main/love/distributedrebirth/numberxd/base2t/typexl/V0x006540ˣᴸ.java deleted file mode 100644 index 2925bcaf..00000000 --- a/numberxd/src/main/love/distributedrebirth/numberxd/base2t/typexl/V0x006540ˣᴸ.java +++ /dev/null @@ -1,58 +0,0 @@ -package love.distributedrebirth.numberxd.base2t.typexl; - -import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ; -import love.distributedrebirth.numberxd.base2t.BaseAppenderOctal; -import love.distributedrebirth.numberxd.base2t.BaseAppenderTyte; -import love.distributedrebirth.numberxd.base2t.BaseIteratorOctal; -import love.distributedrebirth.numberxd.base2t.BaseNumberTyteXL; -import love.distributedrebirth.numberxd.base2t.part.T08PartOctal; - -/** - * Holds an 25920 bit value. (3240 bytes) - */ -@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天") -public class V0x006540ˣᴸ implements BaseNumberTyteXL { - - public static int BIT_COUNT = V0x000CA8ˣᴸ.BIT_COUNT * T08PartOctal.LENGTH(); - private V0x000CA8ˣᴸ[] values = new V0x000CA8ˣᴸ[T08PartOctal.LENGTH()]; - - public V0x006540ˣᴸ() { - for (int i=0;i getValue(v).fillOctalsByClone(appender)); - } - - @Override - public void fillTytesByReference(BaseAppenderTyte appender) { - T08PartOctal.PART_1.BãßVoorElk(v -> getValue(v).fillTytesByReference(appender)); - } -}