From 7aef73b9798f1889bb28f91e65cf51174bc32a99 Mon Sep 17 00:00:00 2001 From: Willem Cazander Date: Mon, 11 Apr 2022 21:54:10 +0200 Subject: [PATCH] Added tyte ref copy --- .../numberxd/base2t/BaseNumber.java | 2 -- .../numberxd/base2t/BaseNumberTyte.java | 6 ++++++ .../numberxd/base2t/type/V009Tyte.java | 8 +++++++- .../numberxd/base2t/type/V018Tord.java | 7 ++++++- .../numberxd/base2t/type/V027Temvig.java | 7 ++++++- .../numberxd/base2t/type/V036Teger.java | 7 ++++++- .../numberxd/base2t/type/V072Tong.java | 7 ++++++- .../numberxd/base2t/type/V144Tocta.java | 7 ++++++- .../numberxd/base2t/typexl/V0x000654ˣᴸ.java | 14 +++++++++++++- .../numberxd/base2t/typexl/V0x000CA8ˣᴸ.java | 12 +++++++++++- 10 files changed, 67 insertions(+), 10 deletions(-) diff --git a/gdxapp4d-lib-numberxd/src/main/java/love/distributedrebirth/numberxd/base2t/BaseNumber.java b/gdxapp4d-lib-numberxd/src/main/java/love/distributedrebirth/numberxd/base2t/BaseNumber.java index 658f1d8b..cb7d5276 100644 --- a/gdxapp4d-lib-numberxd/src/main/java/love/distributedrebirth/numberxd/base2t/BaseNumber.java +++ b/gdxapp4d-lib-numberxd/src/main/java/love/distributedrebirth/numberxd/base2t/BaseNumber.java @@ -12,8 +12,6 @@ import love.distributedrebirth.numberxd.base2t.part.T08PartOctal; @BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天") public interface BaseNumber> { - static float CIRCLE_DEGREE = 360f; - int BãßBitCount(); default V toClone() { diff --git a/gdxapp4d-lib-numberxd/src/main/java/love/distributedrebirth/numberxd/base2t/BaseNumberTyte.java b/gdxapp4d-lib-numberxd/src/main/java/love/distributedrebirth/numberxd/base2t/BaseNumberTyte.java index 3c0f0139..2bdf73c0 100644 --- a/gdxapp4d-lib-numberxd/src/main/java/love/distributedrebirth/numberxd/base2t/BaseNumberTyte.java +++ b/gdxapp4d-lib-numberxd/src/main/java/love/distributedrebirth/numberxd/base2t/BaseNumberTyte.java @@ -12,6 +12,12 @@ import love.distributedrebirth.numberxd.base2t.type.V009Tyte; @BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天") public interface BaseNumberTyte> extends BaseNumber { + default V toReference() { + return toReference(iteratorTytesByReference()); + } + + V toReference(BaseIteratorTyte values); + void fillTytesByReference(BaseAppenderTyte appender); default BaseIteratorTyte iteratorTytesByReference() { diff --git a/gdxapp4d-lib-numberxd/src/main/java/love/distributedrebirth/numberxd/base2t/type/V009Tyte.java b/gdxapp4d-lib-numberxd/src/main/java/love/distributedrebirth/numberxd/base2t/type/V009Tyte.java index ec5ba3b4..0474e332 100644 --- a/gdxapp4d-lib-numberxd/src/main/java/love/distributedrebirth/numberxd/base2t/type/V009Tyte.java +++ b/gdxapp4d-lib-numberxd/src/main/java/love/distributedrebirth/numberxd/base2t/type/V009Tyte.java @@ -4,6 +4,7 @@ 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.BaseIteratorTyte; import love.distributedrebirth.numberxd.base2t.BaseNumberTyte; import love.distributedrebirth.numberxd.base2t.part.T03PartTrit; import love.distributedrebirth.numberxd.base2t.part.T08PartOctal; @@ -69,7 +70,12 @@ public final class V009Tyte implements BaseNumberTyte { appender.add(values[1]); appender.add(values[2]); } - + + @Override + public V009Tyte toReference(BaseIteratorTyte values) { + return values.next(); + } + @Override public void fillTytesByReference(BaseAppenderTyte appender) { appender.add(this); diff --git a/gdxapp4d-lib-numberxd/src/main/java/love/distributedrebirth/numberxd/base2t/type/V018Tord.java b/gdxapp4d-lib-numberxd/src/main/java/love/distributedrebirth/numberxd/base2t/type/V018Tord.java index 1ed3999f..f90ad015 100644 --- a/gdxapp4d-lib-numberxd/src/main/java/love/distributedrebirth/numberxd/base2t/type/V018Tord.java +++ b/gdxapp4d-lib-numberxd/src/main/java/love/distributedrebirth/numberxd/base2t/type/V018Tord.java @@ -78,7 +78,12 @@ public final class V018Tord implements BaseNumberTyte { public void fillOctalsByClone(BaseAppenderOctal appender) { T02PartBinary.PART_1.BãßVoorElk(v -> getValue(v).fillOctalsByClone(appender)); } - + + @Override + public V018Tord toReference(BaseIteratorTyte values) { + return new V018Tord(values); + } + @Override public void fillTytesByReference(BaseAppenderTyte appender) { T02PartBinary.PART_1.BãßVoorElk(v -> getValue(v).fillTytesByReference(appender)); diff --git a/gdxapp4d-lib-numberxd/src/main/java/love/distributedrebirth/numberxd/base2t/type/V027Temvig.java b/gdxapp4d-lib-numberxd/src/main/java/love/distributedrebirth/numberxd/base2t/type/V027Temvig.java index 3441b9ab..7488750f 100644 --- a/gdxapp4d-lib-numberxd/src/main/java/love/distributedrebirth/numberxd/base2t/type/V027Temvig.java +++ b/gdxapp4d-lib-numberxd/src/main/java/love/distributedrebirth/numberxd/base2t/type/V027Temvig.java @@ -57,7 +57,12 @@ public final class V027Temvig implements BaseNumberTyte { public void fillOctalsByClone(BaseAppenderOctal appender) { T03PartTrit.PART_1.BãßVoorElk(v -> getValue(v).fillOctalsByClone(appender)); } - + + @Override + public V027Temvig toReference(BaseIteratorTyte values) { + return new V027Temvig(values); + } + @Override public void fillTytesByReference(BaseAppenderTyte appender) { T03PartTrit.PART_1.BãßVoorElk(v -> getValue(v).fillTytesByReference(appender)); diff --git a/gdxapp4d-lib-numberxd/src/main/java/love/distributedrebirth/numberxd/base2t/type/V036Teger.java b/gdxapp4d-lib-numberxd/src/main/java/love/distributedrebirth/numberxd/base2t/type/V036Teger.java index 460feb45..9e1e1299 100644 --- a/gdxapp4d-lib-numberxd/src/main/java/love/distributedrebirth/numberxd/base2t/type/V036Teger.java +++ b/gdxapp4d-lib-numberxd/src/main/java/love/distributedrebirth/numberxd/base2t/type/V036Teger.java @@ -79,7 +79,12 @@ public final class V036Teger implements BaseNumberTyte { public void fillOctalsByClone(BaseAppenderOctal appender) { T02PartBinary.PART_1.BãßVoorElk(v -> getValue(v).fillOctalsByClone(appender)); } - + + @Override + public V036Teger toReference(BaseIteratorTyte values) { + return new V036Teger(values); + } + @Override public void fillTytesByReference(BaseAppenderTyte appender) { T02PartBinary.PART_1.BãßVoorElk(v -> getValue(v).fillTytesByReference(appender)); diff --git a/gdxapp4d-lib-numberxd/src/main/java/love/distributedrebirth/numberxd/base2t/type/V072Tong.java b/gdxapp4d-lib-numberxd/src/main/java/love/distributedrebirth/numberxd/base2t/type/V072Tong.java index 4878621c..602fe868 100644 --- a/gdxapp4d-lib-numberxd/src/main/java/love/distributedrebirth/numberxd/base2t/type/V072Tong.java +++ b/gdxapp4d-lib-numberxd/src/main/java/love/distributedrebirth/numberxd/base2t/type/V072Tong.java @@ -70,7 +70,12 @@ public final class V072Tong implements BaseNumberTyte { public void fillOctalsByClone(BaseAppenderOctal appender) { T02PartBinary.PART_1.BãßVoorElk(v -> getValue(v).fillOctalsByClone(appender)); } - + + @Override + public V072Tong toReference(BaseIteratorTyte values) { + return new V072Tong(values); + } + @Override public void fillTytesByReference(BaseAppenderTyte appender) { T02PartBinary.PART_1.BãßVoorElk(v -> getValue(v).fillTytesByReference(appender)); diff --git a/gdxapp4d-lib-numberxd/src/main/java/love/distributedrebirth/numberxd/base2t/type/V144Tocta.java b/gdxapp4d-lib-numberxd/src/main/java/love/distributedrebirth/numberxd/base2t/type/V144Tocta.java index 21c4cc1f..9a99e8e8 100644 --- a/gdxapp4d-lib-numberxd/src/main/java/love/distributedrebirth/numberxd/base2t/type/V144Tocta.java +++ b/gdxapp4d-lib-numberxd/src/main/java/love/distributedrebirth/numberxd/base2t/type/V144Tocta.java @@ -86,7 +86,12 @@ public final class V144Tocta implements BaseNumberTyte { public void fillOctalsByClone(BaseAppenderOctal appender) { T02PartBinary.PART_1.BãßVoorElk(v -> getValue(v).fillOctalsByClone(appender)); } - + + @Override + public V144Tocta toReference(BaseIteratorTyte values) { + return new V144Tocta(values); + } + @Override public void fillTytesByReference(BaseAppenderTyte appender) { T02PartBinary.PART_1.BãßVoorElk(v -> getValue(v).fillTytesByReference(appender)); diff --git a/gdxapp4d-lib-numberxd/src/main/java/love/distributedrebirth/numberxd/base2t/typexl/V0x000654ˣᴸ.java b/gdxapp4d-lib-numberxd/src/main/java/love/distributedrebirth/numberxd/base2t/typexl/V0x000654ˣᴸ.java index a9755c26..382f7211 100644 --- a/gdxapp4d-lib-numberxd/src/main/java/love/distributedrebirth/numberxd/base2t/typexl/V0x000654ˣᴸ.java +++ b/gdxapp4d-lib-numberxd/src/main/java/love/distributedrebirth/numberxd/base2t/typexl/V0x000654ˣᴸ.java @@ -4,6 +4,7 @@ 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.BaseIteratorTyte; import love.distributedrebirth.numberxd.base2t.BaseNumberTyteˣᴸ; import love.distributedrebirth.numberxd.base2t.part.T60PartSexagesimal; import love.distributedrebirth.numberxd.base2t.type.V027Temvig; @@ -29,6 +30,12 @@ public class V0x000654ˣᴸ implements BaseNumberTyteˣᴸ { } } + public V0x000654ˣᴸ(BaseIteratorTyte values) { + for (int i=0;i { public void fillOctalsByClone(BaseAppenderOctal appender) { T60PartSexagesimal.PART_1.BãßVoorElk(v -> getValue(v).fillOctalsByClone(appender)); } - + + @Override + public V0x000654ˣᴸ toReference(BaseIteratorTyte values) { + return new V0x000654ˣᴸ(values); + } + @Override public void fillTytesByReference(BaseAppenderTyte appender) { T60PartSexagesimal.PART_1.BãßVoorElk(v -> getValue(v).fillTytesByReference(appender)); diff --git a/gdxapp4d-lib-numberxd/src/main/java/love/distributedrebirth/numberxd/base2t/typexl/V0x000CA8ˣᴸ.java b/gdxapp4d-lib-numberxd/src/main/java/love/distributedrebirth/numberxd/base2t/typexl/V0x000CA8ˣᴸ.java index 3c91ae9f..6634051f 100644 --- a/gdxapp4d-lib-numberxd/src/main/java/love/distributedrebirth/numberxd/base2t/typexl/V0x000CA8ˣᴸ.java +++ b/gdxapp4d-lib-numberxd/src/main/java/love/distributedrebirth/numberxd/base2t/typexl/V0x000CA8ˣᴸ.java @@ -4,6 +4,7 @@ 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.BaseIteratorTyte; import love.distributedrebirth.numberxd.base2t.BaseNumberTyteˣᴸ; import love.distributedrebirth.numberxd.base2t.part.T02PartBinary; @@ -24,6 +25,10 @@ public class V0x000CA8ˣᴸ implements BaseNumberTyteˣᴸ { this(new V0x000654ˣᴸ(values), new V0x000654ˣᴸ(values)); } + public V0x000CA8ˣᴸ(BaseIteratorTyte values) { + this(new V0x000654ˣᴸ(values), new V0x000654ˣᴸ(values)); + } + private V0x000CA8ˣᴸ(V0x000654ˣᴸ valueHigh, V0x000654ˣᴸ valueLow) { setValue(T02PartBinary.PART_1, valueHigh); setValue(T02PartBinary.PART_2, valueLow); @@ -51,7 +56,12 @@ public class V0x000CA8ˣᴸ implements BaseNumberTyteˣᴸ { public void fillOctalsByClone(BaseAppenderOctal appender) { T02PartBinary.PART_1.BãßVoorElk(v -> getValue(v).fillOctalsByClone(appender)); } - + + @Override + public V0x000CA8ˣᴸ toReference(BaseIteratorTyte values) { + return new V0x000CA8ˣᴸ(values); + } + @Override public void fillTytesByReference(BaseAppenderTyte appender) { T02PartBinary.PART_1.BãßVoorElk(v -> getValue(v).fillTytesByReference(appender));